Class: DB::MariaDB::Native::Types::Float

Inherits:
Object
  • Object
show all
Defined in:
lib/db/mariadb/native/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = "FLOAT") ⇒ Float

Returns a new instance of Float.



67
68
69
# File 'lib/db/mariadb/native/types.rb', line 67

def initialize(name = "FLOAT")
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



71
72
73
# File 'lib/db/mariadb/native/types.rb', line 71

def name
  @name
end

Instance Method Details

#parse(string) ⇒ Object



73
74
75
# File 'lib/db/mariadb/native/types.rb', line 73

def parse(string)
  Float(string) if string
end