Class: DB::MariaDB::Native::Types::Integer

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 = "INTEGER") ⇒ Integer

Returns a new instance of Integer.



26
27
28
# File 'lib/db/mariadb/native/types.rb', line 26

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



30
31
32
# File 'lib/db/mariadb/native/types.rb', line 30

def name
  @name
end

Instance Method Details

#parse(string) ⇒ Object



32
33
34
# File 'lib/db/mariadb/native/types.rb', line 32

def parse(string)
  Integer(string) if string
end