Class: GraphAgent::Send
- Inherits:
-
Object
- Object
- GraphAgent::Send
- Defined in:
- lib/graph_agent/types/send.rb
Instance Attribute Summary collapse
-
#arg ⇒ Object
readonly
Returns the value of attribute arg.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(node, arg) ⇒ Send
constructor
A new instance of Send.
- #to_s ⇒ Object (also: #inspect)
Constructor Details
#initialize(node, arg) ⇒ Send
Returns a new instance of Send.
7 8 9 10 |
# File 'lib/graph_agent/types/send.rb', line 7 def initialize(node, arg) @node = node.to_s @arg = arg end |
Instance Attribute Details
#arg ⇒ Object (readonly)
Returns the value of attribute arg.
5 6 7 |
# File 'lib/graph_agent/types/send.rb', line 5 def arg @arg end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
5 6 7 |
# File 'lib/graph_agent/types/send.rb', line 5 def node @node end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
12 13 14 |
# File 'lib/graph_agent/types/send.rb', line 12 def ==(other) other.is_a?(Send) && node == other.node && arg == other.arg end |
#hash ⇒ Object
17 18 19 |
# File 'lib/graph_agent/types/send.rb', line 17 def hash [node, arg].hash end |
#to_s ⇒ Object Also known as: inspect
21 22 23 |
# File 'lib/graph_agent/types/send.rb', line 21 def to_s "Send(node=#{node.inspect}, arg=#{arg.inspect})" end |