class MirrorMirror::Transformation::PropertyTransformation
Public Class Methods
instances()
click to toggle source
The singleton instances, one for each transformation class
Calls superclass method
MirrorMirror::Transformation::Base::instances
# File lib/mirror-mirror/transformation/property_transformation.rb, line 4 def self.instances super. select {|i| i.is_a?(PropertyTransformation) && i.class != PropertyTransformation} end
Public Instance Methods
transform_expression(property, expression)
click to toggle source
It is safe for this method to mutate the expression that is passed to it.
@param property [String] The property whose value is being transformed.
Any prefix/hacks should be removed from the property name.
@param expression [Sass::Script::Node] The value being transformed. @return [Sass::Script::Node] A new expression for the property
# File lib/mirror-mirror/transformation/property_transformation.rb, line 46 def transform_expression(property, expression) return expression end
transform_expression?(name)
click to toggle source
@param name [String] The property name @return [Boolean]
# File lib/mirror-mirror/transformation/property_transformation.rb, line 28 def transform_expression?(name) false end
transform_name(name)
click to toggle source
@param name [String] The property name
# File lib/mirror-mirror/transformation/property_transformation.rb, line 16 def transform_name(name) name end
transform_name?(name)
click to toggle source
@param name [String] The property name @return [Boolean]
# File lib/mirror-mirror/transformation/property_transformation.rb, line 11 def transform_name?(name) false end
transform_value(property, value)
click to toggle source
@param property [String] The property whose value is being transformed.
Any prefix/hacks should be removed from the property name.
@param value [String] The value being transformed. @return [String] A new value for the property
# File lib/mirror-mirror/transformation/property_transformation.rb, line 36 def transform_value(property, value) value end
transform_value?(name)
click to toggle source
@param name [String] The property name @return [Boolean]
# File lib/mirror-mirror/transformation/property_transformation.rb, line 22 def transform_value?(name) false end
Protected Instance Methods
for_each_value(expression) { |e| ... }
click to toggle source
# File lib/mirror-mirror/transformation/property_transformation.rb, line 58 def for_each_value(expression) if expression.is_a?(Sass::Script::List) && expression.separator == :comma expression.value.map! {|e| yield(e) } expression else yield(expression) end end
opts(options) { || ... }
click to toggle source
# File lib/mirror-mirror/transformation/property_transformation.rb, line 52 def opts(options) node = yield node.options = options node end