Class: MercadoPago::Configuration

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

Constant Summary collapse

DEFAULT_CONFIG_FILE_PATH =
'config/mercado_pago.yml'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#config_file_pathObject



17
18
19
# File 'lib/mercado_pago/configuration.rb', line 17

def config_file_path
  @config_file_path || DEFAULT_CONFIG_FILE_PATH
end

Instance Method Details

#access_tokenObject



9
10
11
# File 'lib/mercado_pago/configuration.rb', line 9

def access_token
  config['access_token']
end

#application_idObject



13
14
15
# File 'lib/mercado_pago/configuration.rb', line 13

def application_id
  config['application_id']
end

#environmentObject



21
22
23
# File 'lib/mercado_pago/configuration.rb', line 21

def environment
  @environment ||= ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'test'
end