Class: Fume::Settable::Base::Proxy
- Inherits:
-
Object
- Object
- Fume::Settable::Base::Proxy
show all
- Defined in:
- lib/fume-settable/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize(&block) ⇒ Proxy
Returns a new instance of Proxy.
40
41
42
|
# File 'lib/fume-settable/base.rb', line 40
def initialize(&block)
@callback = block
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
52
53
54
|
# File 'lib/fume-settable/base.rb', line 52
def method_missing(name, *args, &block)
@callback.call(name, *args, &block)
end
|
Instance Method Details
#[](name) ⇒ Object
44
45
46
|
# File 'lib/fume-settable/base.rb', line 44
def [](name)
@callback.call(name)
end
|
#[]=(name, *args, &block) ⇒ Object
48
49
50
|
# File 'lib/fume-settable/base.rb', line 48
def []=(name, *args, &block)
@callback.call("#{name}=", *args, &block)
end
|