Class: Settings
- Inherits:
-
Object
- Object
- Settings
- Defined in:
- lib/popcorn/settings.rb
Class Attribute Summary collapse
-
.conf_file ⇒ Object
Returns the value of attribute conf_file.
-
.library ⇒ Object
Returns the value of attribute library.
Class Method Summary collapse
Class Attribute Details
.conf_file ⇒ Object
Returns the value of attribute conf_file.
11 12 13 |
# File 'lib/popcorn/settings.rb', line 11 def conf_file @conf_file end |
.library ⇒ Object
Returns the value of attribute library.
11 12 13 |
# File 'lib/popcorn/settings.rb', line 11 def library @library end |
Class Method Details
.write_settings(options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/popcorn/settings.rb', line 13 def write_settings(={}) defaults = { :library => @default_library.to_s } = defaults.merge() puts "Writing file." @conf_file.open("w") do |f| config = { :popcorn => } f.write(config.to_yaml) end FileUtils.mkdir_p(Pathname([:library])..to_s) end |