Class: CoopAl::PathFollower
- Inherits:
-
Object
- Object
- CoopAl::PathFollower
- Defined in:
- lib/coop_al/path_follower.rb
Overview
PathFollower
Instance Attribute Summary collapse
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
- #follow(paths, log) ⇒ Object
-
#initialize(library, starting_state) ⇒ PathFollower
constructor
A new instance of PathFollower.
Constructor Details
#initialize(library, starting_state) ⇒ PathFollower
Returns a new instance of PathFollower.
8 9 10 11 |
# File 'lib/coop_al/path_follower.rb', line 8 def initialize(library, starting_state) @library = library @state = starting_state end |
Instance Attribute Details
#state ⇒ Object (readonly)
Returns the value of attribute state.
6 7 8 |
# File 'lib/coop_al/path_follower.rb', line 6 def state @state end |
Instance Method Details
#follow(paths, log) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/coop_al/path_follower.rb', line 13 def follow(paths, log) paths.each do |path| follow_path(path, log) end @state end |