Class: GraphAgent::Send

Inherits:
Object
  • Object
show all
Defined in:
lib/graph_agent/types/send.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#argObject (readonly)

Returns the value of attribute arg.



5
6
7
# File 'lib/graph_agent/types/send.rb', line 5

def arg
  @arg
end

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

#hashObject



17
18
19
# File 'lib/graph_agent/types/send.rb', line 17

def hash
  [node, arg].hash
end

#to_sObject 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