Skip to content

Conditional steps and menu choices? #11

@fabn

Description

@fabn

I really like the approach of this gem but I'm wondering if there's a way to enable conditional steps or there's a way to present a menu to the user to choice from.

I.e. something like (pseudo code)

optional_step 'Do you want to do this?' do
  # if user choose yes this step is executed
end

choices 'Choose your fruit', from: %w(banana apple) do |f|
  case 'banana'
    ask ...
    command ...
  case 'apple'
    # something else
end

Since you're already using tty-prompt gem you have building blocks for that, so it should be a nice addition to this gem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions