Class: Atomy::MessageStructure::BlockArgument

Inherits:
Object
  • Object
show all
Defined in:
lib/atomy/message_structure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body, arguments = [], proc_argument = nil) ⇒ BlockArgument

Returns a new instance of BlockArgument.



21
22
23
24
25
# File 'lib/atomy/message_structure.rb', line 21

def initialize(body, arguments = [], proc_argument = nil)
  @body = body
  @arguments = arguments
  @proc_argument = proc_argument
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



19
20
21
# File 'lib/atomy/message_structure.rb', line 19

def arguments
  @arguments
end

#bodyObject (readonly)

Returns the value of attribute body.



19
20
21
# File 'lib/atomy/message_structure.rb', line 19

def body
  @body
end

#proc_argumentObject (readonly)

Returns the value of attribute proc_argument.



19
20
21
# File 'lib/atomy/message_structure.rb', line 19

def proc_argument
  @proc_argument
end

Instance Method Details

#==(other) ⇒ Object



27
28
29
30
31
32
# File 'lib/atomy/message_structure.rb', line 27

def ==(other)
  other.is_a?(self.class) && \
    other.body == @body && \
    other.arguments == @arguments && \
    other.proc_argument == @proc_argument
end