Method: Transform::Parser::Number.serve
- Defined in:
- lib/source/redshift/transform.rb
.serve(value, unit) ⇒ Object
Returns the final value as a string at the termination of a series of transformations with its inital unit reapplied
Parser::Number.serve(20,‘px’) # => ‘20px’ Parser::Number.serve(40, nil) # => ‘40 The second argument (unit) exists for polymorphic calls and is not used.
270 271 272 |
# File 'lib/source/redshift/transform.rb', line 270 def self.serve(value, unit) return (unit) ? value + unit : value end |