Class: Pedalog::Interface::PedalogDevice

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/pedalog.rb

Instance Method Summary collapse

Instance Method Details

#from_native(device) ⇒ Object



119
120
121
# File 'lib/pedalog.rb', line 119

def from_native(device)
  self[:id] = device.serial
end

#to_nativeObject



111
112
113
114
115
116
117
# File 'lib/pedalog.rb', line 111

def to_native
  device = Device.new

  device.serial = self[:id]

  device
end