Class: Proxy

Inherits:
Struct show all
Defined in:
lib/rspec-console/config_cache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



67
68
69
70
# File 'lib/rspec-console/config_cache.rb', line 67

def method_missing(method, *args, &block)
  self.output << {:method => method, :args => args, :block => block}
  self.target.send(method, *args, &block)
end

Instance Attribute Details

#outputObject

Returns the value of attribute output

Returns:

  • (Object)

    the current value of output



60
61
62
# File 'lib/rspec-console/config_cache.rb', line 60

def output
  @output
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



60
61
62
# File 'lib/rspec-console/config_cache.rb', line 60

def target
  @target
end