Class: Device

Inherits:
Object
  • Object
show all
Defined in:
lib/device/io.rb,
lib/device/walk.rb,
lib/device/audio.rb,
lib/device/print.rb,
lib/device/crypto.rb,
lib/device/helper.rb,
lib/device/system.rb,
lib/device/display.rb,
lib/device/network.rb,
lib/device/runtime.rb,
lib/device/setting.rb,
lib/device/support.rb,
lib/device/version.rb,
lib/device/magnetic.rb,
lib/device/params_dat.rb,
lib/device/application.rb,
lib/device/notification.rb,
lib/device/transaction/emv.rb,
lib/device/transaction/iso.rb,
lib/device/notification_event.rb,
lib/device/transaction/download.rb,
lib/device/notification_callback.rb,
lib/device.rb

Defined Under Namespace

Modules: Helper Classes: Application, Audio, Crypto, Display, IO, Magnetic, Network, Notification, NotificationCallback, NotificationEvent, ParamsDat, Print, Runtime, Setting, Support, System, Transaction, Walk

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.adapterObject

Returns the value of attribute adapter.



3
4
5
# File 'lib/device.rb', line 3

def adapter
  @adapter
end

Class Method Details

.api_versionObject



3
4
5
# File 'lib/device/version.rb', line 3

def self.api_version
  Device::API_VERSION
end

.app_loop(&block) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/device.rb', line 20

def self.app_loop(&block)
  Notification.setup
  loop do
    Notification.check
    block.call(self)
  end
end

.call(*args) ⇒ Object



17
18
# File 'lib/device.rb', line 17

def self.call(*args)
end

.flat_apiClass

Flat syntax/behaviour API between versions, to any application be able to execute on whole versions.

Returns:

  • (Class)

    the class object flatted



9
10
11
12
13
14
15
# File 'lib/device.rb', line 9

def self.flat_api
  klass_version = Device.version.gsub(".", "")
  # Sample
  #if Device.version == "0.4.3"
    #const_get("VersionFlat#{klass_version}").flat Device
  #end
end

.versionObject



7
8
9
# File 'lib/device/version.rb', line 7

def self.version
  adapter.version
end