Class: Garbanzo::Credentials
- Inherits:
-
Object
- Object
- Garbanzo::Credentials
- Defined in:
- lib/garbanzo/credentials.rb
Instance Attribute Summary collapse
-
#login ⇒ Object
readonly
Returns the value of attribute login.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#test_mode ⇒ Object
readonly
Returns the value of attribute test_mode.
Instance Method Summary collapse
-
#initialize(login, password, test_mode = true) ⇒ Credentials
constructor
A new instance of Credentials.
- #to_h ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(login, password, test_mode = true) ⇒ Credentials
Returns a new instance of Credentials.
5 6 7 8 9 |
# File 'lib/garbanzo/credentials.rb', line 5 def initialize(login, password, test_mode = true) @login = login @password = password @test_mode = test_mode end |
Instance Attribute Details
#login ⇒ Object (readonly)
Returns the value of attribute login.
3 4 5 |
# File 'lib/garbanzo/credentials.rb', line 3 def login @login end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
3 4 5 |
# File 'lib/garbanzo/credentials.rb', line 3 def password @password end |
#test_mode ⇒ Object (readonly)
Returns the value of attribute test_mode.
3 4 5 |
# File 'lib/garbanzo/credentials.rb', line 3 def test_mode @test_mode end |
Instance Method Details
#to_h ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/garbanzo/credentials.rb', line 11 def to_h { login: login, password: password, test_mode: test_mode } end |
#valid? ⇒ Boolean
19 20 21 |
# File 'lib/garbanzo/credentials.rb', line 19 def valid? true end |