Class: CQR::OTP::Builder
- Inherits:
-
Object
- Object
- CQR::OTP::Builder
- Defined in:
- lib/cqr/otp/builder.rb
Constant Summary collapse
- VALID_TYPES =
[ "hotp", "totp" ].freeze
- VALID_DIGITS =
[ 6, 8, nil ].freeze
- VALID_PERIOD =
[ 30, 60, nil ].freeze
Instance Attribute Summary collapse
-
#counter ⇒ Object
Returns the value of attribute counter.
-
#digits ⇒ Object
Returns the value of attribute digits.
-
#issuer ⇒ Object
Returns the value of attribute issuer.
-
#label ⇒ Object
Returns the value of attribute label.
-
#period ⇒ Object
Returns the value of attribute period.
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#counter ⇒ Object
Returns the value of attribute counter.
10 11 12 |
# File 'lib/cqr/otp/builder.rb', line 10 def counter @counter end |
#digits ⇒ Object
Returns the value of attribute digits.
10 11 12 |
# File 'lib/cqr/otp/builder.rb', line 10 def digits @digits end |
#issuer ⇒ Object
Returns the value of attribute issuer.
10 11 12 |
# File 'lib/cqr/otp/builder.rb', line 10 def issuer @issuer end |
#label ⇒ Object
Returns the value of attribute label.
10 11 12 |
# File 'lib/cqr/otp/builder.rb', line 10 def label @label end |
#period ⇒ Object
Returns the value of attribute period.
10 11 12 |
# File 'lib/cqr/otp/builder.rb', line 10 def period @period end |
#secret ⇒ Object
Returns the value of attribute secret.
10 11 12 |
# File 'lib/cqr/otp/builder.rb', line 10 def secret @secret end |
#type ⇒ Object
Returns the value of attribute type.
10 11 12 |
# File 'lib/cqr/otp/builder.rb', line 10 def type @type end |
Instance Method Details
#to_qr ⇒ Object
12 13 14 |
# File 'lib/cqr/otp/builder.rb', line 12 def to_qr QRFormatter.new(url) end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/cqr/otp/builder.rb', line 16 def to_s url end |