Class: MirrorMirror::Transformation::PropertyTransformation
- Defined in:
- lib/mirror-mirror/transformation/property_transformation.rb
Direct Known Subclasses
BackgroundPosition, BorderRadius, BoxShadow, Cursor, Direction, DirectionalProperty, Float, LinearGradient, QuadShorthand, TextAlign
Class Method Summary collapse
-
.instances ⇒ Object
The singleton instances, one for each transformation class.
Instance Method Summary collapse
-
#transform_expression(property, expression) ⇒ Sass::Script::Node
It is safe for this method to mutate the expression that is passed to it.
- #transform_expression?(name) ⇒ Boolean
- #transform_name(name) ⇒ Object
- #transform_name?(name) ⇒ Boolean
-
#transform_value(property, value) ⇒ String
A new value for the property.
- #transform_value?(name) ⇒ Boolean
Methods inherited from Base
Class Method Details
.instances ⇒ Object
The singleton instances, one for each transformation class
4 5 6 7 |
# File 'lib/mirror-mirror/transformation/property_transformation.rb', line 4 def self.instances super. select {|i| i.is_a?(PropertyTransformation) && i.class != PropertyTransformation} end |
Instance Method Details
#transform_expression(property, expression) ⇒ Sass::Script::Node
It is safe for this method to mutate the expression that is passed to it.
46 47 48 |
# File 'lib/mirror-mirror/transformation/property_transformation.rb', line 46 def transform_expression(property, expression) return expression end |
#transform_expression?(name) ⇒ Boolean
28 29 30 |
# File 'lib/mirror-mirror/transformation/property_transformation.rb', line 28 def transform_expression?(name) false end |
#transform_name(name) ⇒ Object
16 17 18 |
# File 'lib/mirror-mirror/transformation/property_transformation.rb', line 16 def transform_name(name) name end |
#transform_name?(name) ⇒ Boolean
11 12 13 |
# File 'lib/mirror-mirror/transformation/property_transformation.rb', line 11 def transform_name?(name) false end |
#transform_value(property, value) ⇒ String
Returns A new value for the property.
36 37 38 |
# File 'lib/mirror-mirror/transformation/property_transformation.rb', line 36 def transform_value(property, value) value end |
#transform_value?(name) ⇒ Boolean
22 23 24 |
# File 'lib/mirror-mirror/transformation/property_transformation.rb', line 22 def transform_value?(name) false end |