Class: YubiOATH::Delete
- Inherits:
-
Object
- Object
- YubiOATH::Delete
- Defined in:
- lib/yubioath/delete.rb
Defined Under Namespace
Classes: Request
Instance Method Summary collapse
- #call(name:) ⇒ Object
-
#initialize(card) ⇒ Delete
constructor
A new instance of Delete.
Constructor Details
#initialize(card) ⇒ Delete
Returns a new instance of Delete.
6 7 8 |
# File 'lib/yubioath/delete.rb', line 6 def initialize(card) @card = card end |
Instance Method Details
#call(name:) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/yubioath/delete.rb', line 10 def call(name:) data = Request::Data.new(name: name) request = Request.new(data: data.to_binary_s) bytes = @card.transmit(request.to_binary_s) Response.read(bytes).success? end |