Class: Gamefic::SceneData::MultipleChoice

Inherits:
Base
  • Object
show all
Defined in:
lib/gamefic/scene_data/multiple_choice.rb

Direct Known Subclasses

MultipleScene

Instance Attribute Summary collapse

Attributes inherited from Base

#input

Instance Method Summary collapse

Instance Attribute Details

#indexObject

Returns the value of attribute index.



6
7
8
# File 'lib/gamefic/scene_data/multiple_choice.rb', line 6

def index
  @index
end

#invalid_messageObject



14
15
16
# File 'lib/gamefic/scene_data/multiple_choice.rb', line 14

def invalid_message
  @invalid_message ||= 'That is not a valid choice.'
end

#numberObject

Returns the value of attribute number.



5
6
7
# File 'lib/gamefic/scene_data/multiple_choice.rb', line 5

def number
  @number
end

#selectionObject

Returns the value of attribute selection.



4
5
6
# File 'lib/gamefic/scene_data/multiple_choice.rb', line 4

def selection
  @selection
end

Instance Method Details

#optionsObject



8
9
10
# File 'lib/gamefic/scene_data/multiple_choice.rb', line 8

def options
  @options ||= []
end

#promptObject



11
12
13
# File 'lib/gamefic/scene_data/multiple_choice.rb', line 11

def prompt
  @prompt ||= 'Enter a choice:'
end