Class: Internal::ByteDecoder::Expression::Literal
- Inherits:
-
Internal::ByteDecoder::Expression
- Object
- Internal::ByteDecoder::Expression
- Internal::ByteDecoder::Expression::Literal
- Defined in:
- lib/internal/vm/bytedecoder.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Internal::ByteDecoder::Expression
Instance Method Summary collapse
-
#initialize(pc, value) ⇒ Literal
constructor
A new instance of Literal.
- #precedence ⇒ Object
- #to_s ⇒ Object
Methods inherited from Internal::ByteDecoder::Expression
Constructor Details
#initialize(pc, value) ⇒ Literal
Returns a new instance of Literal.
81 82 83 84 |
# File 'lib/internal/vm/bytedecoder.rb', line 81 def initialize(pc, value) super(pc) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
79 80 81 |
# File 'lib/internal/vm/bytedecoder.rb', line 79 def value @value end |
Instance Method Details
#precedence ⇒ Object
93 94 95 |
# File 'lib/internal/vm/bytedecoder.rb', line 93 def precedence return 1 end |
#to_s ⇒ Object
86 87 88 89 90 91 |
# File 'lib/internal/vm/bytedecoder.rb', line 86 def to_s case @value when Regexp then "/#{@value.inspect[1..-2]}/" else; return @value.inspect end end |