class Mucks::LayoutConfig

Public Class Methods

new(path) click to toggle source
Calls superclass method Mucks::BaseConfig::new
# File lib/mucks/mucks.rb, line 45
def initialize(path)
  super
  config = {}
  @config.each do |k, v|
    config[k] = get_commands_for(v).flatten
  end
  @config = config
end

Public Instance Methods

[](key) click to toggle source
# File lib/mucks/mucks.rb, line 58
def [](key)
  @config[key]
end
layout_keys() click to toggle source
# File lib/mucks/mucks.rb, line 54
def layout_keys
  @config.keys
end

Private Instance Methods

get_commands_for(list) click to toggle source
# File lib/mucks/mucks.rb, line 64
def get_commands_for(list)
  list.map do |item|
    candidate = @config[item]
    if candidate
      get_commands_for candidate
    else
      item
    end
  end
end