Class: DB::Postgres::Native::Types::Integer

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = "INTEGER") ⇒ Integer

Returns a new instance of Integer.



41
42
43
# File 'lib/db/postgres/native/types.rb', line 41

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



45
46
47
# File 'lib/db/postgres/native/types.rb', line 45

def name
  @name
end

Instance Method Details

#parse(string) ⇒ Object



47
48
49
# File 'lib/db/postgres/native/types.rb', line 47

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