Module: Airsprite::Config::ModuleMethods
- Included in:
- Airsprite::Config
- Defined in:
- lib/airsprite/config.rb
Instance Method Summary collapse
- #parse_config_file ⇒ Object
- #path ⇒ Object
- #path=(value) ⇒ Object
- #scales ⇒ Object
- #scales=(value) ⇒ Object
Instance Method Details
#parse_config_file ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/airsprite/config.rb', line 22 def parse_config_file self.path = Dir.pwd if File.exists?(CONFIG_FILENAME) YAML.load(File.read(CONFIG_FILENAME)).each {|(name, value)| send "#{name}=", value } else self.scales = [1.0] end end |
#path ⇒ Object
11 12 13 |
# File 'lib/airsprite/config.rb', line 11 def path @@path end |
#path=(value) ⇒ Object
8 9 10 |
# File 'lib/airsprite/config.rb', line 8 def path=(value) @@path = value end |
#scales ⇒ Object
18 19 20 |
# File 'lib/airsprite/config.rb', line 18 def scales @@scales end |
#scales=(value) ⇒ Object
15 16 17 |
# File 'lib/airsprite/config.rb', line 15 def scales=(value) @@scales = value end |