Class: Cpaas::Config
- Inherits:
-
Object
- Object
- Cpaas::Config
- Defined in:
- lib/cpaas-sdk/config.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#email ⇒ Object
Returns the value of attribute email.
-
#password ⇒ Object
Returns the value of attribute password.
Instance Method Summary collapse
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
9 10 11 |
# File 'lib/cpaas-sdk/config.rb', line 9 def base_url @base_url end |
#client_id ⇒ Object
Returns the value of attribute client_id.
5 6 7 |
# File 'lib/cpaas-sdk/config.rb', line 5 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
6 7 8 |
# File 'lib/cpaas-sdk/config.rb', line 6 def client_secret @client_secret end |
#email ⇒ Object
Returns the value of attribute email.
7 8 9 |
# File 'lib/cpaas-sdk/config.rb', line 7 def email @email end |
#password ⇒ Object
Returns the value of attribute password.
8 9 10 |
# File 'lib/cpaas-sdk/config.rb', line 8 def password @password end |
Instance Method Details
#validate ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/cpaas-sdk/config.rb', line 11 def validate raise ArgumentError.new('`client_id` cannot be nil') if client_id.nil? raise ArgumentError.new('`clientSecret` or `email/password` cannot be nil') if client_secret.nil? && (email.nil? || password.nil?) true end |