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



9
10
11
12
13
14
15
16
# File 'lib/belvo/utils.rb', line 9

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