Class: PuntosPoint::Config
- Inherits:
-
Object
- Object
- PuntosPoint::Config
- Defined in:
- lib/puntospoint/config.rb
Overview
Configuration variables wsdl_url, api user, api password
Constant Summary collapse
- BASE_WSDL_URL =
'http://dev.puntospoint.com/api/cmr/events/wsdl'
Instance Attribute Summary collapse
-
#api_password ⇒ Object
Returns the value of attribute api_password.
-
#api_user ⇒ Object
Returns the value of attribute api_user.
-
#config_filepath ⇒ Object
Returns the value of attribute config_filepath.
-
#wsdl_url ⇒ Object
Returns the value of attribute wsdl_url.
Instance Method Summary collapse
-
#initialize(env = nil) ⇒ Config
constructor
Public: Loads the configuration file puntospoint.yml If it’s a rails application it will take the file from the config/ directory.
Constructor Details
#initialize(env = nil) ⇒ Config
Public: Loads the configuration file puntospoint.yml If it’s a rails application it will take the file from the config/ directory
env - Environment.
Returns a Config object.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/puntospoint/config.rb', line 16 def initialize(env = nil) if env # For non-rails apps @config_filepath = File.join(File.dirname(__FILE__), "..", "..", "config", "puntospoint.yml") load(env) else @config_filepath = File.join(Rails.root, "config", "puntospoint.yml") load(Rails.env) end end |
Instance Attribute Details
#api_password ⇒ Object
Returns the value of attribute api_password.
8 9 10 |
# File 'lib/puntospoint/config.rb', line 8 def api_password @api_password end |
#api_user ⇒ Object
Returns the value of attribute api_user.
8 9 10 |
# File 'lib/puntospoint/config.rb', line 8 def api_user @api_user end |
#config_filepath ⇒ Object
Returns the value of attribute config_filepath.
8 9 10 |
# File 'lib/puntospoint/config.rb', line 8 def config_filepath @config_filepath end |
#wsdl_url ⇒ Object
Returns the value of attribute wsdl_url.
8 9 10 |
# File 'lib/puntospoint/config.rb', line 8 def wsdl_url @wsdl_url end |