Class: CSS::BackgroundProperty
- Defined in:
- lib/css/properties/background_property.rb
Instance Method Summary collapse
Methods inherited from Property
#<<, #==, #[], create, #get, #initialize, #inspect, #method_missing, #value
Methods included from Normalize
Constructor Details
This class inherits a constructor from CSS::Property
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CSS::Property
Instance Method Details
#name ⇒ Object
3 4 5 |
# File 'lib/css/properties/background_property.rb', line 3 def name 'background' end |
#to_s ⇒ Object
7 8 9 |
# File 'lib/css/properties/background_property.rb', line 7 def to_s %w(color image repeat position attachment).map { |prop| @properties[prop] && @properties[prop] != default_properties[prop] ? @properties[prop].value : nil }.compact.join(' ') end |
#to_style ⇒ Object
11 12 13 |
# File 'lib/css/properties/background_property.rb', line 11 def to_style [name, to_s].join(':') end |