Class: Sybase::DataFormat
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Sybase::DataFormat
- Defined in:
- lib/sybase/structs/data_format.rb
Constant Summary collapse
- INTS =
[:namelen, :datatype, :format, :maxlength, :scale, :precision, :status, :count, :usertype]
Instance Attribute Summary collapse
-
#ruby_type ⇒ Object
Returns the value of attribute ruby_type.
Instance Method Summary collapse
Instance Attribute Details
#ruby_type ⇒ Object
Returns the value of attribute ruby_type.
20 21 22 |
# File 'lib/sybase/structs/data_format.rb', line 20 def ruby_type @ruby_type end |
Instance Method Details
#inspect ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/sybase/structs/data_format.rb', line 40 def inspect "#<%s name=%s namelen=%d datatype=%d format=%d maxlength=%d scale=%d precision=%d status=%d count=%d usertype=%d locale=%s address=%x>" % [ self.class.name, name.inspect, self[:namelen], self[:datatype], self[:format], self[:maxlength], self[:scale], self[:precision], self[:status], self[:count], self[:usertype], self[:locale].inspect, to_ptr.address ] end |
#name ⇒ Object
58 59 60 |
# File 'lib/sybase/structs/data_format.rb', line 58 def name self[:name].to_s end |
#reset! ⇒ Object
36 37 38 |
# File 'lib/sybase/structs/data_format.rb', line 36 def reset! INTS.each { |key| self[key] = 0 } end |