Skip to content

Instantly share code, notes, and snippets.

@jteneycke
Created October 9, 2013 16:35
Show Gist options
  • Save jteneycke/6904145 to your computer and use it in GitHub Desktop.
Save jteneycke/6904145 to your computer and use it in GitHub Desktop.
def step?(step)
@current_step.nil? || current_step + 1 == step
end
» @object.current_step
=> 0
» @object.step?(0)
=> true
» @object.step?(1)
=> true
» @object.step?(2)
=> true
» @object.step?(3)
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment