Class: Pione::Agent::AgentState
- Inherits:
-
StructX
- Object
- StructX
- Pione::Agent::AgentState
- Defined in:
- lib/pione/agent/basic-agent.rb
Overview
AgentState represents a state of agent. The state is a pair of previous transiton and current transition.
Instance Method Summary collapse
Instance Method Details
#current?(state) ⇒ Boolean
334 335 336 |
# File 'lib/pione/agent/basic-agent.rb', line 334 def current?(state) current == state end |
#previous?(state) ⇒ Boolean
330 331 332 |
# File 'lib/pione/agent/basic-agent.rb', line 330 def previous?(state) previous == state end |
#to_s ⇒ Object
338 339 340 |
# File 'lib/pione/agent/basic-agent.rb', line 338 def to_s "<%s=>%s>" % [previous, current] end |