class RedBikini::Bikini
Public Class Methods
new(object)
click to toggle source
# File lib/red_bikini/bikini.rb, line 6 def initialize object @__in_bikini__ = object end
Public Instance Methods
===(other)
click to toggle source
# File lib/red_bikini/bikini.rb, line 10 def === other @__in_bikini__ === other end
_self()
click to toggle source
# File lib/red_bikini/bikini.rb, line 14 def _self @__in_bikini__ end
method_missing(method, *args)
click to toggle source
# File lib/red_bikini/bikini.rb, line 28 def method_missing method, *args @__in_bikini__.public_send(object_method(method), *args) end
object_method(method)
click to toggle source
# File lib/red_bikini/bikini.rb, line 18 def object_method method original(method) or setter_imitated_by(method) end
original(method)
click to toggle source
# File lib/red_bikini/bikini.rb, line 21 def original method @__in_bikini__.respond_to?(method, true) and method end
respond_to_missing?(method, *args)
click to toggle source
# File lib/red_bikini/bikini.rb, line 25 def respond_to_missing? method, *args @__in_bikini__.respond_to?(object_method(method), *args) end
setter_imitated_by(method)
click to toggle source
# File lib/red_bikini/bikini.rb, line 33 def setter_imitated_by method [/set_(?<attr>\w+)/,/(?<attr>\w+)(_are|_is)/].find do |setter_matcher| String(method).match(setter_matcher){|match| return match['attr'] + ?= } end end