Class: Frizz::Configuration
- Inherits:
-
Object
- Object
- Frizz::Configuration
- Defined in:
- lib/frizz/configuration.rb
Constant Summary collapse
- YAML_FILENAME =
"frizz.yml"
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
-
#current_environment ⇒ Object
Returns the value of attribute current_environment.
-
#environments ⇒ Object
Returns the value of attribute environments.
-
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
Instance Method Summary collapse
- #environment ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/frizz/configuration.rb', line 8 def initialize self.environments = {} # Attempt to load defaults from ENV self.access_key_id = ENV["AWS_ACCESS_KEY_ID"] self.secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"] self.current_environment = ENV["FRIZZ_ENV"] || "development" # Allow to be overridden in yaml if yaml_exists? load_yaml! start_yaml_listener end end |
Instance Attribute Details
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
5 6 7 |
# File 'lib/frizz/configuration.rb', line 5 def access_key_id @access_key_id end |
#current_environment ⇒ Object
Returns the value of attribute current_environment.
5 6 7 |
# File 'lib/frizz/configuration.rb', line 5 def current_environment @current_environment end |
#environments ⇒ Object
Returns the value of attribute environments.
5 6 7 |
# File 'lib/frizz/configuration.rb', line 5 def environments @environments end |
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
5 6 7 |
# File 'lib/frizz/configuration.rb', line 5 def secret_access_key @secret_access_key end |
Instance Method Details
#environment ⇒ Object
23 24 25 |
# File 'lib/frizz/configuration.rb', line 23 def environment environments[current_environment] end |