Class: Gamefic::Props::Default
- Inherits:
-
Object
- Object
- Gamefic::Props::Default
- Defined in:
- lib/gamefic/props/default.rb
Overview
A collection of data related to a scene. Scenes define which Props class they use. Props can be accessed in a scene’s on_start and on_finish callbacks.
Props::Default includes the most common attributes that a scene requires. Scenes are able but not required to subclass it. Some scenes, like MultipleChoice, use specialized Props subclasses, but in many cases, Props::Default is sufficient.
Direct Known Subclasses
Instance Attribute Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#input ⇒ String
19 20 21 |
# File 'lib/gamefic/props/default.rb', line 19 def input @input end |
#prompt ⇒ Object
21 22 23 |
# File 'lib/gamefic/props/default.rb', line 21 def prompt @prompt ||= '>' end |
Instance Method Details
#enter(text) ⇒ Object
30 31 32 |
# File 'lib/gamefic/props/default.rb', line 30 def enter(text) @input = text end |
#output ⇒ Object
25 26 27 |
# File 'lib/gamefic/props/default.rb', line 25 def output @output ||= Props::Output.new end |