Class: Transformers::MethodCall

Inherits:
Object
  • Object
show all
Defined in:
lib/transformers/method_call.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (MethodCall) initialize(name)



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