Class: Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/belvo/utils.rb

Overview

Class to get the api url given an environment name

Constant Summary collapse

SANDBOX =
'https://sandbox.belvo.com'
DEVELOPMENT =
'https://development.belvo.com'
PRODUCTION =
'https://api.belvo.com'

Class Method Summary collapse

Class Method Details

.get_url(environment) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/belvo/utils.rb', line 23

def self.get_url(environment)
  nil unless environment
  begin
    const_get environment.upcase
  rescue NameError
    environment
  end
end