class Nofly::EventLibrary
Public Class Methods
new(obj, options)
click to toggle source
# File lib/nofly/event_library.rb, line 3 def initialize(obj, options) @obj = obj @options = options end
Private Instance Methods
method_missing(method, *args, &block)
click to toggle source
Calls superclass method
# File lib/nofly/event_library.rb, line 10 def method_missing(method, *args, &block) # enables 'foo' to return @obj if it is an instance of the Foo class return @obj if @obj.class.to_s.downcase.to_sym == method # access options' keys as if they were local variables if @options[method] || @options[method.to_sym] return @options[method] || @options[method.to_sym] end super end