Class: Matahari::Invocation

Inherits:
Object
  • Object
show all
Defined in:
lib/matahari/invocation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, args) ⇒ Invocation

Returns a new instance of Invocation.



5
6
7
8
# File 'lib/matahari/invocation.rb', line 5

def initialize(method, args)
  @method = method
  @args = args.flatten(1)
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



3
4
5
# File 'lib/matahari/invocation.rb', line 3

def args
  @args
end

#methodObject (readonly)

Returns the value of attribute method.



3
4
5
# File 'lib/matahari/invocation.rb', line 3

def method
  @method
end

Instance Method Details

#==(other) ⇒ Object



10
11
12
# File 'lib/matahari/invocation.rb', line 10

def ==(other)
  self.method == other.method && self.args == other.args
end