class YubiOATH::List
Public Class Methods
new(card)
click to toggle source
# File lib/yubioath/list.rb, line 7 def initialize(card) @card = card end
Public Instance Methods
call()
click to toggle source
# File lib/yubioath/list.rb, line 11 def call request = Request.new bytes = @card.transmit(request.to_binary_s) response = Response.read(bytes) response[:codes].map do |code| [code.name, { type: TYPES.key(code.oath_type), algorithm: ALGORITHMS.key(code.algorithm), }] end.to_h end