Class: Aygabtu::RouteMark

Inherits:
Object
  • Object
show all
Defined in:
lib/aygabtu/route_mark.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionObject (readonly)

Returns the value of attribute action.



7
8
9
# File 'lib/aygabtu/route_mark.rb', line 7

def action
  @action
end

#checkpointObject (readonly)

Returns the value of attribute checkpoint.



7
8
9
# File 'lib/aygabtu/route_mark.rb', line 7

def checkpoint
  @checkpoint
end

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

Returns:

  • (Boolean)


9
10
11
# File 'lib/aygabtu/route_mark.rb', line 9

def conflicting?(other)
  !(action == :visit && other.action == :visit)
end

#descriptionObject



13
14
15
# File 'lib/aygabtu/route_mark.rb', line 13

def description
  "#{action} action at #{poc} (CP #{checkpoint})"
end