Class: Aygabtu::RouteMark
- Inherits:
-
Object
- Object
- Aygabtu::RouteMark
- Defined in:
- lib/aygabtu/route_mark.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#checkpoint ⇒ Object
readonly
Returns the value of attribute checkpoint.
-
#poc ⇒ Object
readonly
Returns the value of attribute poc.
Instance Method Summary collapse
- #conflicting?(other) ⇒ Boolean
- #description ⇒ Object
-
#initialize(action, poc, checkpoint) ⇒ RouteMark
constructor
A new instance of RouteMark.
Constructor Details
#initialize(action, poc, checkpoint) ⇒ RouteMark
Returns a new instance of RouteMark.
4 5 6 |
# File 'lib/aygabtu/route_mark.rb', line 4 def initialize(action, poc, checkpoint) @action, @poc, @checkpoint = action, poc, checkpoint end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
7 8 9 |
# File 'lib/aygabtu/route_mark.rb', line 7 def action @action end |
#checkpoint ⇒ Object (readonly)
Returns the value of attribute checkpoint.
7 8 9 |
# File 'lib/aygabtu/route_mark.rb', line 7 def checkpoint @checkpoint end |
#poc ⇒ Object (readonly)
Returns the value of attribute poc.
7 8 9 |
# File 'lib/aygabtu/route_mark.rb', line 7 def poc @poc end |
Instance Method Details
#conflicting?(other) ⇒ Boolean
9 10 11 |
# File 'lib/aygabtu/route_mark.rb', line 9 def conflicting?(other) !(action == :visit && other.action == :visit) end |
#description ⇒ Object
13 14 15 |
# File 'lib/aygabtu/route_mark.rb', line 13 def description "#{action} action at #{poc} (CP #{checkpoint})" end |