Class: Gamefic::SceneData::YesOrNo
- Defined in:
- lib/gamefic/scene_data/yes_or_no.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Instance Method Details
#invalid_message ⇒ Object
13 14 15 |
# File 'lib/gamefic/scene_data/yes_or_no.rb', line 13 def ||= 'Please enter Yes or No.' end |
#no? ⇒ Boolean
7 8 9 |
# File 'lib/gamefic/scene_data/yes_or_no.rb', line 7 def no? input.to_s[0,1].downcase == 'n' end |
#prompt ⇒ Object
10 11 12 |
# File 'lib/gamefic/scene_data/yes_or_no.rb', line 10 def prompt @prompt ||= 'Yes or No?' end |
#yes? ⇒ Boolean
4 5 6 |
# File 'lib/gamefic/scene_data/yes_or_no.rb', line 4 def yes? input.to_s[0,1].downcase == 'y' end |