Class: Rubill::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#debugObject



36
37
38
# File 'lib/rubill.rb', line 36

def debug
  @debug || false
end

#dev_keyObject

Returns the value of attribute dev_key.



15
16
17
# File 'lib/rubill.rb', line 15

def dev_key
  @dev_key
end

#org_idObject

Returns the value of attribute org_id.



16
17
18
# File 'lib/rubill.rb', line 16

def org_id
  @org_id
end

#passwordObject

Returns the value of attribute password.



14
15
16
# File 'lib/rubill.rb', line 14

def password
  @password
end

#sandboxObject



40
41
42
# File 'lib/rubill.rb', line 40

def sandbox
  @sandbox || false
end

#user_nameObject

Returns the value of attribute user_name.



13
14
15
# File 'lib/rubill.rb', line 13

def user_name
  @user_name
end

Instance Method Details

#missing_keysObject



30
31
32
33
34
# File 'lib/rubill.rb', line 30

def missing_keys
  required_keys.reject do |k|
    to_hash[k]
  end
end

#required_keysObject



20
21
22
# File 'lib/rubill.rb', line 20

def required_keys
  %w(user_name password dev_key org_id)
end

#to_hashObject



24
25
26
27
28
# File 'lib/rubill.rb', line 24

def to_hash
  required_keys.each_with_object({}) do |k, h|
    h[k] = send(k.to_sym)
  end
end