lib/scss_beautifier/config.rb in scss_beautifier-0.1.11 vs lib/scss_beautifier/config.rb in scss_beautifier-0.1.12

- old
+ new

@@ -10,16 +10,21 @@ def parse_config(config_location) YAML.load(File.read(config_location)) end def formatters - enabled_formatters = @config["formatters"].select {|_, formatter| formatter["enabled"] }.keys - enabled_formatters.map do |formatter| - SCSSBeautifier::Formatters.const_get(formatter.split("_").map(&:capitalize).join) + enabled_formatters = [] + @config["formatters"].each do |formatter, options| + if options["enabled"] + klass = SCSSBeautifier::Formatters.const_get(formatter.split("_").map(&:capitalize).join) + enabled_formatters << klass.new(options) + end end + enabled_formatters end def tab_style @config["tab_style"] || " " end + end -end \ No newline at end of file +end