Class: Transformers::MethodCall
- Inherits:
-
Object
- Object
- Transformers::MethodCall
- Defined in:
- lib/transformers/method_call.rb
Instance Attribute Summary (collapse)
-
- (Object) name
readonly
Returns the value of attribute name.
Instance Method Summary (collapse)
- - (Object) ==(other)
- - (Object) call(value)
-
- (MethodCall) initialize(name)
constructor
A new instance of MethodCall.
Constructor Details
- (MethodCall) initialize(name)
A new instance of MethodCall
5 6 7 |
# File 'lib/transformers/method_call.rb', line 5 def initialize(name) @name = name end |
Instance Attribute Details
- (Object) name (readonly)
Returns the value of attribute name
3 4 5 |
# File 'lib/transformers/method_call.rb', line 3 def name @name end |
Instance Method Details
- (Object) ==(other)
13 14 15 |
# File 'lib/transformers/method_call.rb', line 13 def ==(other) self.name.to_s == other.name.to_s end |
- (Object) call(value)
9 10 11 |
# File 'lib/transformers/method_call.rb', line 9 def call(value) value.send(self.name) end |