Class: NemID::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
9
10
# File 'lib/nemid/configuration.rb', line 5

def initialize
  @env = default_for_env
  @oces_cert = nil
  @private_key = nil
  @spid = nil
end

Instance Attribute Details

#envObject

Returns the value of attribute env.



3
4
5
# File 'lib/nemid/configuration.rb', line 3

def env
  @env
end

#oces_certObject

Returns the value of attribute oces_cert.



3
4
5
# File 'lib/nemid/configuration.rb', line 3

def oces_cert
  @oces_cert
end

#private_keyObject

Returns the value of attribute private_key.



3
4
5
# File 'lib/nemid/configuration.rb', line 3

def private_key
  @private_key
end

#spidObject

Returns the value of attribute spid.



3
4
5
# File 'lib/nemid/configuration.rb', line 3

def spid
  @spid
end

Instance Method Details

#default_for_envObject



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

def default_for_env
  return Rails.env.to_s if defined?(Rails.env)
  ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
end