Class: Rubill::Configuration
- Inherits:
-
Object
- Object
- Rubill::Configuration
- Defined in:
- lib/rubill.rb
Instance Attribute Summary collapse
- #debug ⇒ Object
-
#dev_key ⇒ Object
Returns the value of attribute dev_key.
-
#org_id ⇒ Object
Returns the value of attribute org_id.
-
#password ⇒ Object
Returns the value of attribute password.
- #sandbox ⇒ Object
-
#user_name ⇒ Object
Returns the value of attribute user_name.
Instance Method Summary collapse
Instance Attribute Details
#debug ⇒ Object
36 37 38 |
# File 'lib/rubill.rb', line 36 def debug @debug || false end |
#dev_key ⇒ Object
Returns the value of attribute dev_key.
15 16 17 |
# File 'lib/rubill.rb', line 15 def dev_key @dev_key end |
#org_id ⇒ Object
Returns the value of attribute org_id.
16 17 18 |
# File 'lib/rubill.rb', line 16 def org_id @org_id end |
#password ⇒ Object
Returns the value of attribute password.
14 15 16 |
# File 'lib/rubill.rb', line 14 def password @password end |
#sandbox ⇒ Object
40 41 42 |
# File 'lib/rubill.rb', line 40 def sandbox @sandbox || false end |
#user_name ⇒ Object
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_keys ⇒ Object
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_keys ⇒ Object
20 21 22 |
# File 'lib/rubill.rb', line 20 def required_keys %w(user_name password dev_key org_id) end |
#to_hash ⇒ Object
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 |