Class: BinaryParser::Expression::Token::Variable
- Inherits:
-
BinaryParser::Expression::Token
- Object
- BinaryParser::Expression
- BinaryParser::Expression::Token
- BinaryParser::Expression::Token::Variable
- Defined in:
- lib/binary_parser/general_class/expression.rb
Defined Under Namespace
Classes: Control, Length, Nextbits, Value
Instance Attribute Summary collapse
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
Instance Method Summary collapse
-
#initialize(symbol) ⇒ Variable
constructor
A new instance of Variable.
Methods inherited from BinaryParser::Expression::Token
Methods inherited from BinaryParser::Expression
#%, #*, #+, #-, #/, #binary_op, #coerce, control_var, #control_var?, #eval, immediate, #immediate?, length_var, #length_var?, nextbits_var, #nextbits_var?, #to_exp, value_var, #value_var?, #variable_tokens
Constructor Details
#initialize(symbol) ⇒ Variable
Returns a new instance of Variable.
129 130 131 132 |
# File 'lib/binary_parser/general_class/expression.rb', line 129 def initialize(symbol) raise BadManipulationError, "Argument should be Symbol." unless symbol.is_a?(Symbol) @symbol = symbol end |
Instance Attribute Details
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
127 128 129 |
# File 'lib/binary_parser/general_class/expression.rb', line 127 def symbol @symbol end |