Sha256: 9a634f72492d77288c4a001cc19f775b27ec41a472f03cef7e961dfc03a773d4
Contents?: true
Size: 578 Bytes
Versions: 2
Compression:
Stored size: 578 Bytes
Contents
require "yaml" module SCSSBeautifier class Config def initialize(config_location) @config = parse_config(config_location) end 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) end end def tab_style @config["tab_style"] || " " end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
scss_beautifier-0.1.11 | lib/scss_beautifier/config.rb |
scss_beautifier-0.1.10 | lib/scss_beautifier/config.rb |