Module: NFC
- Defined in:
- lib/ruby-nfc/nfc.rb,
lib/ruby-nfc/reader.rb,
lib/ruby-nfc/tags/tag.rb
Defined Under Namespace
Classes: Error, Reader, Tag
Constant Summary
collapse
- @@context =
nil
- @@logger =
Logger.new(STDERR)
Class Method Summary
collapse
Class Method Details
.context ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/ruby-nfc/nfc.rb', line 16
def self.context
unless @@context
ptr = FFI::MemoryPointer.new(:pointer, 1)
LibNFC.nfc_init(ptr)
@@context = ptr.read_pointer
end
end
|
.logger ⇒ Object
24
25
26
|
# File 'lib/ruby-nfc/nfc.rb', line 24
def self.logger
@@logger
end
|
.version ⇒ Object
12
13
14
|
# File 'lib/ruby-nfc/nfc.rb', line 12
def self.version
LibNFC.nfc_version
end
|