class Gamefic::Scene::ActiveChoice


‘:perform`, `:recue`, or `:continue`.
three actions to take when the user does not enter one of the options:
Authors can use the `without_selection` class method to select one of
attempt to process input that does not match any of the options.
A scene that presents a list of optional choices. The scene can still

def self.inherited(klass)

def self.inherited(klass)
  super
  klass.without_selection without_selection_action
end

def self.type

def self.type
  'ActiveChoice'
end

def self.without_selection(action)

Parameters:
  • action (Symbol) --
def self.without_selection(action)
  WITHOUT_SELECTION_ACTIONS.include?(action) ||
    raise(ArgumentError, "without_selection_action must be one of #{WITHOUT_SELECTION_ACTIONS.map(&:inspect).join_or}")
  @without_selection_action = action
end

def self.without_selection_action

Returns:
  • (Symbol) -
def self.without_selection_action
  @without_selection_action ||= :perform
end

def continue

def continue
  run_finish_blocks
end

def finish

def finish
  return super if props.selected?
  send(self.class.without_selection_action)
end

def perform

def perform
  actor.perform props.input
end

def recue

def recue
  actor.tell props.invalid_message
  actor.recue
end

def without_selection_action

def without_selection_action
  self.class.without_selection_action
end