Class: Proj4::ProjXY
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Proj4::ProjXY
- Defined in:
- lib/ffi-proj4/projxy.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ ProjXY
constructor
A new instance of ProjXY.
- #x ⇒ Object
- #x=(v) ⇒ Object
- #y ⇒ Object
- #y=(v) ⇒ Object
Constructor Details
#initialize(*args) ⇒ ProjXY
Returns a new instance of ProjXY.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ffi-proj4/projxy.rb', line 9 def initialize(*args) case args.first when FFI::Pointer, FFI::Buffer super(*args) when FFI::Buffer super(*args) else if !args.empty? self[:x], self[:y] = args.map(&:to_f) end end end |
Instance Method Details
#x ⇒ Object
30 31 32 |
# File 'lib/ffi-proj4/projxy.rb', line 30 def x self[:x] end |
#x=(v) ⇒ Object
22 23 24 |
# File 'lib/ffi-proj4/projxy.rb', line 22 def x=(v) self[:x] = v end |
#y ⇒ Object
34 35 36 |
# File 'lib/ffi-proj4/projxy.rb', line 34 def y self[:y] end |
#y=(v) ⇒ Object
26 27 28 |
# File 'lib/ffi-proj4/projxy.rb', line 26 def y=(v) self[:y] = v end |