Class: WAG::Indices::Base
- Inherits:
-
Object
- Object
- WAG::Indices::Base
- Defined in:
- lib/wag/indices/base.rb
Constant Summary collapse
- RANGE =
[0..0xFFFFFFFF].freeze
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(value) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 |
# File 'lib/wag/indices/base.rb', line 9 def initialize(value) raise "Index 0x#{value.to_s(16)} does not fit in an i32" unless RANGE.cover?(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/wag/indices/base.rb', line 7 def value @value end |