class Mucks::BaseConfig
Attributes
config[R]
Public Class Methods
new(path)
click to toggle source
# File lib/mucks/mucks.rb, line 14 def initialize(path) @config = SystemIO.load_yaml(File.expand_path(path)) show_self if Config.verbose end
Public Instance Methods
show_self()
click to toggle source
# File lib/mucks/mucks.rb, line 19 def show_self Output.wrap_with(self.class) do s = '' @config.each do |key, value| s += "#{key} => " if value.is_a?(Array) then s += stringify_elements_for(value) else s += "\n" s += " #{value}}\n" end end puts s end end
stringify_elements_for(array)
click to toggle source
# File lib/mucks/mucks.rb, line 35 def stringify_elements_for(array) s = "[\n" array.each do |element| s += " #{element.inspect},\n" end s += "]\n" end