Class: ODPI::BindType::Float

Inherits:
Base
  • Object
show all
Defined in:
lib/odpi/bindtype.rb

Constant Summary collapse

TYPES =
[:number, :bytes]

Instance Attribute Summary

Attributes inherited from Base

#raw_var

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, #get, #set, to_bindclass

Constructor Details

#initialize(conn, value, type, params, array_size, is_array) ⇒ Float

Returns a new instance of Float.


234
235
236
# File 'lib/odpi/bindtype.rb', line 234

def initialize(conn, value, type, params, array_size, is_array)
  super(conn, array_size, 0, false, is_array, nil)
end

Class Method Details

.convert_in(conn, val) ⇒ Object


238
239
240
# File 'lib/odpi/bindtype.rb', line 238

def self.convert_in(conn, val)
  val.to_f.to_s
end

.convert_out(conn, val) ⇒ Object


242
243
244
# File 'lib/odpi/bindtype.rb', line 242

def self.convert_out(conn, val)
  val.to_f
end