Class: CssDryer::Processor::StyleHash
- Defined in:
- lib/css_dryer/processor.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#multiline ⇒ Object
Returns the value of attribute multiline.
Instance Method Summary collapse
- #has_non_style_hash_children ⇒ Object
-
#initialize(*a, &b) ⇒ StyleHash
constructor
A new instance of StyleHash.
-
#key ⇒ Object
We only ever have one key and one value.
- #key=(key) ⇒ Object
- #value ⇒ Object
- #value=(value) ⇒ Object
Constructor Details
#initialize(*a, &b) ⇒ StyleHash
Returns a new instance of StyleHash.
305 306 307 308 |
# File 'lib/css_dryer/processor.rb', line 305 def initialize *a, &b super multiline = false end |
Instance Attribute Details
#multiline ⇒ Object
Returns the value of attribute multiline.
304 305 306 |
# File 'lib/css_dryer/processor.rb', line 304 def multiline @multiline end |
Instance Method Details
#has_non_style_hash_children ⇒ Object
309 310 311 312 313 314 315 |
# File 'lib/css_dryer/processor.rb', line 309 def has_non_style_hash_children value.each do |elem| next if elem.kind_of? StyleHash return true unless elem.blank? end false end |
#key ⇒ Object
We only ever have one key and one value
317 318 319 |
# File 'lib/css_dryer/processor.rb', line 317 def key self.keys.first end |
#key=(key) ⇒ Object
320 321 322 |
# File 'lib/css_dryer/processor.rb', line 320 def key=(key) self.keys.first = key end |
#value ⇒ Object
323 324 325 |
# File 'lib/css_dryer/processor.rb', line 323 def value self.values.first end |
#value=(value) ⇒ Object
326 327 328 |
# File 'lib/css_dryer/processor.rb', line 326 def value=(value) self.values.first = value end |