Class: Dutiful::Config
- Inherits:
-
Object
- Object
- Dutiful::Config
- Defined in:
- lib/dutiful/config.rb
Constant Summary collapse
- PATH =
::File. '~/.dutiful/config.toml'
Class Method Summary collapse
Class Method Details
.storage ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/dutiful/config.rb', line 4 def self.storage @storage ||= if content[:storage] name = content[:storage][:name] path = content[:storage][:path] Dutiful::Storage.new name: name, path: path else Dutiful::Storage.find { |storage| storage.available? } end end |