Class: InovaDynamicLink::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#branch_access_tokenObject

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_idObject

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_keyObject

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_secretObject

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