Class: Wrake::Configuration
- Inherits:
-
Object
- Object
- Wrake::Configuration
- Defined in:
- lib/wrake/configuration.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#url ⇒ Object
Returns the value of attribute url.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/wrake/configuration.rb', line 3 def password @password end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/wrake/configuration.rb', line 3 def url @url end |
#username ⇒ Object
Returns the value of attribute username.
3 4 5 |
# File 'lib/wrake/configuration.rb', line 3 def username @username end |
Instance Method Details
#from_file(file, env = nil) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/wrake/configuration.rb', line 5 def from_file(file, env = nil) env ||= defined?(Rails) ? Rails.env : 'production' config = YAML::load(File.open(file))[env] config.each do |key, value| send("#{key}=", value) end end |