class Dutiful::Config
Constants
- PATH
Public Class Methods
osx?()
click to toggle source
# File lib/dutiful/config.rb, line 15 def self.osx? `uname -s`.strip == 'Darwin' end
storage()
click to toggle source
# 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
Private Class Methods
content()
click to toggle source
# File lib/dutiful/config.rb, line 21 def self.content @content ||= Tomlrb.load_file(PATH, symbolize_keys: true) rescue {} end