Class: Findrr::Config
- Inherits:
-
Object
- Object
- Findrr::Config
- Defined in:
- lib/findrr/config.rb
Instance Attribute Summary collapse
-
#base_dir ⇒ Object
Returns the value of attribute base_dir.
Instance Method Summary collapse
-
#initialize(base_dir = default_base_dir) ⇒ Config
constructor
A new instance of Config.
- #save(target) ⇒ Object
Constructor Details
#initialize(base_dir = default_base_dir) ⇒ Config
Returns a new instance of Config.
6 7 8 9 |
# File 'lib/findrr/config.rb', line 6 def initialize(base_dir=default_base_dir) @base_dir = base_dir @config = read end |
Instance Attribute Details
#base_dir ⇒ Object
Returns the value of attribute base_dir.
5 6 7 |
# File 'lib/findrr/config.rb', line 5 def base_dir @base_dir end |
Instance Method Details
#save(target) ⇒ Object
11 12 13 14 15 |
# File 'lib/findrr/config.rb', line 11 def save(target) FileUtils.mkdir_p(@base_dir) @config["history"] << target write end |