Class: Retl::NextDescription
- Inherits:
-
Object
- Object
- Retl::NextDescription
- Defined in:
- lib/retl/next_description.rb
Instance Method Summary collapse
- #describe_next(description) ⇒ Object
-
#initialize(default = "unknown") ⇒ NextDescription
constructor
A new instance of NextDescription.
- #reset ⇒ Object
- #take ⇒ Object
Constructor Details
#initialize(default = "unknown") ⇒ NextDescription
Returns a new instance of NextDescription.
3 4 5 6 |
# File 'lib/retl/next_description.rb', line 3 def initialize(default="unknown") @default = default reset end |
Instance Method Details
#describe_next(description) ⇒ Object
12 13 14 |
# File 'lib/retl/next_description.rb', line 12 def describe_next(description) @next_description = description end |
#reset ⇒ Object
8 9 10 |
# File 'lib/retl/next_description.rb', line 8 def reset @next_description = @default end |
#take ⇒ Object
16 17 18 19 20 |
# File 'lib/retl/next_description.rb', line 16 def take description = @next_description reset description end |