Class: ROTP::OTP::URI
- Inherits:
-
Object
- Object
- ROTP::OTP::URI
- Defined in:
- lib/rotp/otp/uri.rb
Overview
Instance Method Summary collapse
-
#initialize(otp, account_name: nil, counter: nil) ⇒ URI
constructor
A new instance of URI.
- #to_s ⇒ Object
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 = account_name || '' @counter = counter end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/rotp/otp/uri.rb', line 11 def to_s "otpauth://#{type}/#{label}?#{parameters}" end |