Class: InovaDynamicLink::Configuration
- Inherits:
-
Object
- Object
- InovaDynamicLink::Configuration
- Defined in:
- lib/inova_dynamic_link/configuration.rb
Instance Attribute Summary collapse
-
#branch_access_token ⇒ Object
Returns the value of attribute branch_access_token.
-
#branch_app_id ⇒ Object
Returns the value of attribute branch_app_id.
-
#branch_key ⇒ Object
Returns the value of attribute branch_key.
-
#branch_secret ⇒ Object
Returns the value of attribute branch_secret.
Instance Method Summary collapse
Instance Attribute Details
#branch_access_token ⇒ Object
Returns the value of attribute branch_access_token.
3 4 5 |
# File 'lib/inova_dynamic_link/configuration.rb', line 3 def branch_access_token @branch_access_token end |
#branch_app_id ⇒ Object
Returns the value of attribute branch_app_id.
3 4 5 |
# File 'lib/inova_dynamic_link/configuration.rb', line 3 def branch_app_id @branch_app_id end |
#branch_key ⇒ Object
Returns the value of attribute branch_key.
3 4 5 |
# File 'lib/inova_dynamic_link/configuration.rb', line 3 def branch_key @branch_key end |
#branch_secret ⇒ Object
Returns the value of attribute branch_secret.
3 4 5 |
# File 'lib/inova_dynamic_link/configuration.rb', line 3 def branch_secret @branch_secret end |
Instance Method Details
#validate! ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/inova_dynamic_link/configuration.rb', line 5 def validate! required_attributes = [:branch_key, :branch_secret, :branch_access_token, :branch_app_id] required_attributes.each do |attribute| value = send(attribute) raise ArgumentError, "#{attribute} is required in the configuration" if value.nil? || (value.respond_to?(:empty?) && value.empty?) end end |