Class: ROTP::OTP::URI

Inherits:
Object
  • Object
show all
Defined in:
lib/rotp/otp/uri.rb

Overview

Instance Method Summary collapse

Constructor Details

#initialize(otp, account_name: nil, counter: nil) ⇒ URI

Returns a new instance of URI.



5
6
7
8
9
# File 'lib/rotp/otp/uri.rb', line 5

def initialize(otp, account_name: nil, counter: nil)
  @otp = otp
  @account_name =  || ''
  @counter = counter
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/rotp/otp/uri.rb', line 11

def to_s
  "otpauth://#{type}/#{label}?#{parameters}"
end