Class: Rho::NFCTagTechnology_NdefFormatable

Inherits:
NFCTagTechnology show all
Defined in:
lib/extensions/nfc/nfc.rb

Constant Summary

Constants inherited from NFCTagTechnology

Rho::NFCTagTechnology::ISODEP, Rho::NFCTagTechnology::MIFARE_CLASSIC, Rho::NFCTagTechnology::MIFARE_ULTRALIGHT, Rho::NFCTagTechnology::NDEF, Rho::NFCTagTechnology::NDEF_FORMATABLE, Rho::NFCTagTechnology::NFCA, Rho::NFCTagTechnology::NFCB, Rho::NFCTagTechnology::NFCF, Rho::NFCTagTechnology::NFCV

Instance Method Summary collapse

Methods inherited from NFCTagTechnology

#close, #connect, #get_name, #is_connected

Constructor Details

#initializeNFCTagTechnology_NdefFormatable

Returns a new instance of NFCTagTechnology_NdefFormatable.



509
510
511
# File 'lib/extensions/nfc/nfc.rb', line 509

def initialize
    super(NFCTagTechnology::NDEF_FORMATABLE)
end

Instance Method Details

#format(msg) ⇒ Object

msg - NdefMessage



514
515
516
# File 'lib/extensions/nfc/nfc.rb', line 514

def format(msg)
    Nfc.tech_NdefFormatable_format(msg.get_byte_array)
end

#format_read_only(msg) ⇒ Object

msg - NdefMessage



519
520
521
# File 'lib/extensions/nfc/nfc.rb', line 519

def format_read_only(msg)
    Nfc.tech_NdefFormatable_format_read_only(msg.get_byte_array)
end