Class: Credigy::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/credigy/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



15
16
17
18
# File 'lib/credigy/config.rb', line 15

def initialize
  @verbose = false
  @env = :dev
end

Instance Attribute Details

#envObject

Returns the value of attribute env.



12
13
14
# File 'lib/credigy/config.rb', line 12

def env
  @env
end

#verboseObject

Returns the value of attribute verbose.



12
13
14
# File 'lib/credigy/config.rb', line 12

def verbose
  @verbose
end

#wsdlObject



24
25
26
27
28
29
30
31
32
# File 'lib/credigy/config.rb', line 24

def wsdl
  return @wsdl if @wsdl

  if production_env?
    'https://www.credigy.com.br/CredigyWSP/CredigyAgenciesWSS.asmx?WSDL'.freeze
  else
    'https://www.credigy.com.br/CredigyWST/CredigyAgenciesWSS.asmx?WSDL'.freeze
  end
end

Instance Method Details

#production_env?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/credigy/config.rb', line 20

def production_env?
  env == :production
end