Class: Innodb::DataType::DoubleType

Inherits:
Object
  • Object
show all
Defined in:
lib/innodb/data_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_type, modifiers, properties) ⇒ DoubleType

Returns a new instance of DoubleType.



78
79
80
81
# File 'lib/innodb/data_type.rb', line 78

def initialize(base_type, modifiers, properties)
  @width = 8
  @name = Innodb::DataType.make_name(base_type, modifiers, properties)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



76
77
78
# File 'lib/innodb/data_type.rb', line 76

def name
  @name
end

#widthObject (readonly)

Returns the value of attribute width.



76
77
78
# File 'lib/innodb/data_type.rb', line 76

def width
  @width
end

Instance Method Details

#value(data) ⇒ Object

Read a little-endian double-precision floating-point number.



84
85
86
# File 'lib/innodb/data_type.rb', line 84

def value(data)
  BinData::DoubleLe.read(data)
end