Class: Fatty::Prompt
- Inherits:
-
Object
- Object
- Fatty::Prompt
- Defined in:
- lib/fatty/prompt.rb
Constant Summary collapse
- DEFAULT =
"> "
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value = nil, &block) ⇒ Prompt
constructor
A new instance of Prompt.
- #text ⇒ Object
- #to_s ⇒ Object (also: #inspect)
Constructor Details
Class Method Details
Instance Method Details
#text ⇒ Object
18 19 20 |
# File 'lib/fatty/prompt.rb', line 18 def text @block.call.to_s end |
#to_s ⇒ Object Also known as: inspect
22 23 24 |
# File 'lib/fatty/prompt.rb', line 22 def to_s "<Prompt:#{object_id}> `#{text}`" end |