Class: Garbanzo::Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/garbanzo/credentials.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(, password, test_mode = true)
  @login = 
  @password = password
  @test_mode = test_mode
end

Instance Attribute Details

#loginObject (readonly)

Returns the value of attribute login.



3
4
5
# File 'lib/garbanzo/credentials.rb', line 3

def 
  @login
end

#passwordObject (readonly)

Returns the value of attribute password.



3
4
5
# File 'lib/garbanzo/credentials.rb', line 3

def password
  @password
end

#test_modeObject (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_hObject



11
12
13
14
15
16
17
# File 'lib/garbanzo/credentials.rb', line 11

def to_h
  {
    login: ,
    password: password,
    test_mode: test_mode
  }
end

#valid?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/garbanzo/credentials.rb', line 19

def valid?
  true
end