Sha256: 545e897cb53ced68bf7f827eb5bde506d07a44e8af8ea41911aeff2599473305

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

module Jekyll
  module Maps
    class OptionsParser
      class << self
        def parse(raw_options)
          options = { :filters => {} }
          raw_options.strip.split(" ").each do |pair|
            key   = pair.split(":").first.strip
            value = pair.split(":").last.strip
            value = value.split(",") if value.include?(",")
            options[:filters][key] = value
          end
          options
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-maps-1.0.2 lib/jekyll-maps/options_parser.rb