Class: Namarara::StringValue
- Defined in:
- lib/namarara/parser.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Attributes inherited from TreeValue
Instance Method Summary collapse
- #compute ⇒ Object
-
#initialize(str) ⇒ StringValue
constructor
A new instance of StringValue.
- #to_s ⇒ Object
Constructor Details
#initialize(str) ⇒ StringValue
Returns a new instance of StringValue.
64 65 66 67 |
# File 'lib/namarara/parser.rb', line 64 def initialize(str) @errors = [] @value = str end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
62 63 64 |
# File 'lib/namarara/parser.rb', line 62 def errors @errors end |
Instance Method Details
#compute ⇒ Object
69 70 71 |
# File 'lib/namarara/parser.rb', line 69 def compute @value end |
#to_s ⇒ Object
73 74 75 |
# File 'lib/namarara/parser.rb', line 73 def to_s "string:\"#{@value}\"" end |