Class: Dramaturg::Value::Unknown
- Defined in:
- lib/dramaturg/value/unknown.rb
Instance Method Summary collapse
- #for_prompt ⇒ Object
- #for_run ⇒ Object
-
#initialize ⇒ Unknown
constructor
A new instance of Unknown.
- #to_s ⇒ Object (also: #inspect)
Methods inherited from OrDefault
Methods inherited from Base
Constructor Details
#initialize ⇒ Unknown
6 7 8 |
# File 'lib/dramaturg/value/unknown.rb', line 6 def initialize() super(nil) end |
Instance Method Details
#for_prompt ⇒ Object
10 11 12 |
# File 'lib/dramaturg/value/unknown.rb', line 10 def for_prompt '???' end |
#for_run ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/dramaturg/value/unknown.rb', line 14 def for_run if @value == nil raise ArgumentError, "You must set a value" else @value end end |
#to_s ⇒ Object Also known as: inspect
22 23 24 |
# File 'lib/dramaturg/value/unknown.rb', line 22 def to_s "{{unknown}}" end |