Sha256: 63513c2bdfbcff6ce3c563d1dae82639b5bac4a1f310eb5709ca4572c8d27f34
Contents?: true
Size: 547 Bytes
Versions: 7
Compression:
Stored size: 547 Bytes
Contents
class StyleStats::Css class AggregateDeclaration attr_accessor :declarations def initialize() self.declarations = {} end def add(property, value) if self.declarations.has_key?(property) self.declarations[property][:values] << value self.declarations[property][:values].uniq! self.declarations[property][:count] += 1 else self.declarations[property] = {values: [value], count: 1} end end def [](property) self.declarations[property] || {} end end end
Version data entries
7 entries across 7 versions & 1 rubygems