Class: BinaryParser::Expression::Token::Immediate

Inherits:
BinaryParser::Expression::Token show all
Defined in:
lib/binary_parser/general_class/expression.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BinaryParser::Expression::Token

#to_rpn

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

#valueObject (readonly)

Returns the value of attribute value.



161
162
163
# File 'lib/binary_parser/general_class/expression.rb', line 161

def value
  @value
end