Class: FortuneTeller::Panel
- Inherits:
-
Object
- Object
- FortuneTeller::Panel
- Defined in:
- lib/fortune_teller/panel.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#label ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute label.
-
#reveal ⇒ Object
Returns the value of attribute reveal.
-
#ui ⇒ Object
Returns the value of attribute ui.
Instance Method Summary collapse
-
#initialize(label, options = {}) ⇒ Panel
constructor
A new instance of Panel.
- #pick ⇒ Object
- #present? ⇒ Boolean
Constructor Details
Instance Attribute Details
#label ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute label.
4 5 6 |
# File 'lib/fortune_teller/panel.rb', line 4 def label @label end |
#reveal ⇒ Object
Returns the value of attribute reveal.
5 6 7 |
# File 'lib/fortune_teller/panel.rb', line 5 def reveal @reveal end |
#ui ⇒ Object
Returns the value of attribute ui.
6 7 8 |
# File 'lib/fortune_teller/panel.rb', line 6 def ui @ui end |
Instance Method Details
#pick ⇒ Object
18 19 20 21 |
# File 'lib/fortune_teller/panel.rb', line 18 def pick ui.interstitial( "Flick, flick, flick, flick..." ) reveal.choose end |
#present? ⇒ Boolean
14 15 16 |
# File 'lib/fortune_teller/panel.rb', line 14 def present? true end |