Class: Innodb::DataType::DoubleType
- Inherits:
-
Object
- Object
- Innodb::DataType::DoubleType
- Defined in:
- lib/innodb/data_type.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(base_type, modifiers, properties) ⇒ DoubleType
constructor
A new instance of DoubleType.
-
#value(data) ⇒ Object
Read a little-endian double-precision floating-point number.
Constructor Details
#initialize(base_type, modifiers, properties) ⇒ DoubleType
Returns a new instance of DoubleType.
83 84 85 86 |
# File 'lib/innodb/data_type.rb', line 83 def initialize(base_type, modifiers, properties) @width = 8 @name = Innodb::DataType.make_name(base_type, modifiers, properties) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
80 81 82 |
# File 'lib/innodb/data_type.rb', line 80 def name @name end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
81 82 83 |
# File 'lib/innodb/data_type.rb', line 81 def width @width end |
Instance Method Details
#value(data) ⇒ Object
Read a little-endian double-precision floating-point number.
89 90 91 |
# File 'lib/innodb/data_type.rb', line 89 def value(data) BinData::DoubleLe.read(data) end |