Class: Freenom::Authenticator
- Defined in:
- lib/freenom/dns/explorers/authenticator.rb
Constant Summary collapse
- LOGIN_URL =
'https://my.freenom.com/clientarea.php'
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(username:, password:) ⇒ Authenticator
constructor
A new instance of Authenticator.
- #run ⇒ Object
Methods included from ExtendedCapybaraDSL
Methods included from Expecting
Constructor Details
#initialize(username:, password:) ⇒ Authenticator
Returns a new instance of Authenticator.
11 12 13 14 |
# File 'lib/freenom/dns/explorers/authenticator.rb', line 11 def initialize(username:, password:) @username = username @password = password end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'lib/freenom/dns/explorers/authenticator.rb', line 9 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
9 10 11 |
# File 'lib/freenom/dns/explorers/authenticator.rb', line 9 def username @username end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/freenom/dns/explorers/authenticator.rb', line 16 def run visit LOGIN_URL return if already_login? submit_credential raise LoginFailedError if failed_to_login? end |