Class: Gamefic::SceneData::MultipleScene

Inherits:
MultipleChoice show all
Defined in:
lib/gamefic/scene_data/multiple_scene.rb

Instance Attribute Summary

Attributes inherited from MultipleChoice

#index, #invalid_message, #number, #selection

Attributes inherited from Base

#input, #prompt

Instance Method Summary collapse

Methods inherited from MultipleChoice

#prompt

Instance Method Details

#map(choice, scene) ⇒ Object



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

def map choice, scene
  scene_map[choice] = scene
end

#optionsObject



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

def options
  scene_map.keys
end

#scene_for(choice) ⇒ Object



12
13
14
# File 'lib/gamefic/scene_data/multiple_scene.rb', line 12

def scene_for choice
  scene_map[choice]
end

#scene_mapObject



16
17
18
# File 'lib/gamefic/scene_data/multiple_scene.rb', line 16

def scene_map
  @scene_map ||= {}
end