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

#initialize(name) ⇒ MethodCall



5
6
7
# File 'lib/transformers/method_call.rb', line 5

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (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

#==(other) ⇒ Object



13
14
15
# File 'lib/transformers/method_call.rb', line 13

def ==(other)
  self.name.to_s == other.name.to_s
end

#call(value) ⇒ Object



9
10
11
# File 'lib/transformers/method_call.rb', line 9

def call(value)
  value.send(self.name)
end