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.



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

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#widthObject (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