class DrgDSL::Ast::Constant
“3”, “'MDC'”, …
Attributes
value[R]
Public Class Methods
new(value)
click to toggle source
# File lib/drgdsl/ast.rb, line 446 def initialize(value) @value = value.to_s.strip.tr("'", '') end
Public Instance Methods
hash()
click to toggle source
# File lib/drgdsl/ast.rb, line 458 def hash @hash ||= [type, value].hash end
to_hash()
click to toggle source
# File lib/drgdsl/ast.rb, line 454 def to_hash { constant: { value: value } } end
to_s()
click to toggle source
# File lib/drgdsl/ast.rb, line 450 def to_s value.to_s end