We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8b03c3 commit 37e5e33Copy full SHA for 37e5e33
lib/csscss/types.rb
@@ -1,5 +1,5 @@
1
module Csscss
2
- class Declaration < Struct.new(:property, :value, :parents)
+ Declaration = Struct.new(:property, :value, :parents) do
3
def self.from_csspool(dec)
4
new(dec.property.to_s.downcase, dec.expressions.join(" ").downcase)
5
end
@@ -79,7 +79,7 @@ def normalize_value(value)
79
80
81
82
- class Selector < Struct.new(:selectors)
+ Selector = Struct.new(:selectors) do
83
def self.from_parser(selectors)
84
new(selectors.to_s.strip)
85
@@ -97,6 +97,5 @@ def inspect
97
98
99
100
- class Ruleset < Struct.new(:selectors, :declarations)
101
- end
+ Ruleset = Struct.new(:selectors, :declarations)
102
0 commit comments