Class: NemID::Configuration
- Inherits:
-
Object
- Object
- NemID::Configuration
- Defined in:
- lib/nemid/configuration.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
-
#oces_cert ⇒ Object
Returns the value of attribute oces_cert.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#spid ⇒ Object
Returns the value of attribute spid.
Instance Method Summary collapse
- #default_for_env ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#env ⇒ Object
Returns the value of attribute env.
3 4 5 |
# File 'lib/nemid/configuration.rb', line 3 def env @env end |
#oces_cert ⇒ Object
Returns the value of attribute oces_cert.
3 4 5 |
# File 'lib/nemid/configuration.rb', line 3 def oces_cert @oces_cert end |
#private_key ⇒ Object
Returns the value of attribute private_key.
3 4 5 |
# File 'lib/nemid/configuration.rb', line 3 def private_key @private_key end |
#spid ⇒ Object
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_env ⇒ Object
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 |