Class: Namarara::StringValue

Inherits:
TreeValue show all
Defined in:
lib/namarara/parser.rb

Instance Attribute Summary collapse

Attributes inherited from TreeValue

#value

Instance Method Summary collapse

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

#errorsObject (readonly)

Returns the value of attribute errors.



62
63
64
# File 'lib/namarara/parser.rb', line 62

def errors
  @errors
end

Instance Method Details

#computeObject



69
70
71
# File 'lib/namarara/parser.rb', line 69

def compute
  @value
end

#to_sObject



73
74
75
# File 'lib/namarara/parser.rb', line 73

def to_s
  "string:\"#{@value}\""
end