Class: BinaryParser::Expression::Token::Immediate
- Inherits:
-
BinaryParser::Expression::Token
- Object
- BinaryParser::Expression
- BinaryParser::Expression::Token
- BinaryParser::Expression::Token::Immediate
- Defined in:
- lib/binary_parser/general_class/expression.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ Immediate
constructor
A new instance of Immediate.
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(value) ⇒ Immediate
Returns a new instance of Immediate.
163 164 165 166 |
# File 'lib/binary_parser/general_class/expression.rb', line 163 def initialize(value) raise BadManipulationError, "Argument should be Integer." unless value.is_a?(Integer) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
161 162 163 |
# File 'lib/binary_parser/general_class/expression.rb', line 161 def value @value end |