Class: Moodwall::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/moodwall/config.rb

Constant Summary collapse

DEFAULTS =
{
  executable: {
    command:   "feh",
    arguments: "--bg-fill"
  }
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config_file = ConfigFile.new) ⇒ Config

Returns a new instance of Config.



12
13
14
15
# File 'lib/moodwall/config.rb', line 12

def initialize(config_file = ConfigFile.new)
  @data       = config_file.data
  @executable = decorate_executable(@data.fetch("executable", {}))
end

Instance Attribute Details

#executableObject (readonly)

Returns the value of attribute executable.



10
11
12
# File 'lib/moodwall/config.rb', line 10

def executable
  @executable
end