module Locomotive module Steam module Liquid module Filters module Base def absolute_url(url) url =~ Locomotive::Steam::IsHTTP ? url : URI.join(@context['base_url'], url).to_s end protected # Convert an array of properties ('key:value') into a hash # Ex: ['width:50', 'height:100'] => { width: '50', height: '100' } def args_to_options(*args) options = {} args.flatten.each do |a| if (a =~ /^(.*):(.*)$/) options[$1.to_sym] = $2 end end options end # Write options (Hash) into a string according to the following pattern: # ="", ="