Class: ScaleRb::PortableRegistry
- Inherits:
-
Object
- Object
- ScaleRb::PortableRegistry
- Extended by:
- TypeEnforcer
- Includes:
- Types
- Defined in:
- lib/scale_rb/portable_registry.rb
Constant Summary
Constants included from Types
Types::DecodeResult, Types::HashMap, Types::Hex, Types::PortableType, Types::Primitive, Types::Registry, Types::Ti, Types::TypedArray, Types::U8, Types::U8Array, Types::UnsignedInteger, Types::VariantKind
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Instance Method Summary collapse
- #[](index) ⇒ Object
-
#initialize(data) ⇒ PortableRegistry
constructor
A new instance of PortableRegistry.
- #inspect ⇒ Object
Methods included from TypeEnforcer
Constructor Details
#initialize(data) ⇒ PortableRegistry
Returns a new instance of PortableRegistry.
12 13 14 15 16 |
# File 'lib/scale_rb/portable_registry.rb', line 12 def initialize(data) @data = data @types = ::Array.new(@data.size) build_types end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/scale_rb/portable_registry.rb', line 9 def data @data end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
9 10 11 |
# File 'lib/scale_rb/portable_registry.rb', line 9 def types @types end |
Instance Method Details
#[](index) ⇒ Object
19 20 21 |
# File 'lib/scale_rb/portable_registry.rb', line 19 def [](index) @types[index] end |
#inspect ⇒ Object
23 24 25 |
# File 'lib/scale_rb/portable_registry.rb', line 23 def inspect "a_portable_registry" end |