class Roadie::Inliner::StyleMap
it’s an accumulator for properties, scoped on specific elements.
StyleMap is a map between a DOM element and {StyleAttributeBuilder}. Basically,
@api private
def add(elements, new_properties)
def add(elements, new_properties) Array(elements).each do |element| new_properties.each do |property| @map[element] << property end end end
def each_element(&block)
def each_element(&block) @map.each_pair(&block) end
def initialize
def initialize @map = Hash.new do |hash, key| hash[key] = StyleAttributeBuilder.new end end