Class: LibSL::LLFixed
- Inherits:
-
Object
- Object
- LibSL::LLFixed
- Defined in:
- lib/types.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Class Method Summary collapse
Instance Method Summary collapse
- #encode ⇒ Object
-
#initialize(data) ⇒ LLFixed
constructor
A new instance of LLFixed.
Constructor Details
#initialize(data) ⇒ LLFixed
Returns a new instance of LLFixed.
92 93 94 |
# File 'lib/types.rb', line 92 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
91 92 93 |
# File 'lib/types.rb', line 91 def data @data end |
Class Method Details
.decode(data, len) ⇒ Object
82 83 84 85 |
# File 'lib/types.rb', line 82 def self.decode(data, len) data = data.unpack("a#{len}a*") return self.new(data[0]), data[1] end |
Instance Method Details
#encode ⇒ Object
87 88 89 |
# File 'lib/types.rb', line 87 def encode() @data end |