Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/jekyll/share/utils.rb
Overview
Convert the params to hash
Instance Method Summary collapse
Instance Method Details
#split_params(context) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/jekyll/share/utils.rb', line 9 def split_params(context) scan(/(\w+)=(?:(["'])(.+?)\2|([^ ]+))/) .to_h do |x| x[3] = context[x[3]] if x[1].nil? x.delete_at 1 x.compact end end |