Class: DistritoTracking::Configuration

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

Constant Summary collapse

FIELDS =
%i[region access_key_id secret_access_key topic_arn].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_key_idObject

Returns the value of attribute access_key_id.



5
6
7
# File 'lib/distrito_tracking/configuration.rb', line 5

def access_key_id
  @access_key_id
end

#regionObject

Returns the value of attribute region.



5
6
7
# File 'lib/distrito_tracking/configuration.rb', line 5

def region
  @region
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



5
6
7
# File 'lib/distrito_tracking/configuration.rb', line 5

def secret_access_key
  @secret_access_key
end

#topic_arnObject

Returns the value of attribute topic_arn.



5
6
7
# File 'lib/distrito_tracking/configuration.rb', line 5

def topic_arn
  @topic_arn
end

Instance Method Details

#validate!Object



9
10
11
12
13
14
15
# File 'lib/distrito_tracking/configuration.rb', line 9

def validate!
  FIELDS.each do |field|
    raise DistritoTracking::Error, "#{field} is missing" unless send(field)
  end

  true
end