Class: Restfulie::Client::Mikyung::SteadyStateWalker

Inherits:
Object
  • Object
show all
Defined in:
lib/restfulie/client/mikyung/steady_state_walker.rb

Instance Method Summary collapse

Instance Method Details

#move(goal, current, mikyung) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/restfulie/client/mikyung/steady_state_walker.rb', line 6

def move(goal, current, mikyung)
  step = goal.next_step(current, mikyung)
  raise UnableToAchieveGoalError, "No step was found for #{current}" unless step
  Common::Logger.logger.debug "Mikyung > next step will be #{step}"
  step = step.new if step.kind_of? Class
  try_to_execute(step, current, 3, mikyung)
end