Class: Sass::Constant::Literal
- Defined in:
- lib/gems/haml-2.0.4/lib/sass/constant/literal.rb,
lib/gems/haml-2.0.4/lib/sass/constant/literal.rb
Overview
:nodoc:
Constant Summary collapse
- NUMBER =
The regular expression matching numbers.
/^(-?\d*?\.?)(\d+)([^\d\s]*)$/
- COLOR =
The regular expression matching colors.
/^\# (?: [\da-f]{3} | [\da-f]{6} ) | #{html_color_matcher}/ix
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #concat(other) ⇒ Object
-
#initialize(value = nil) ⇒ Literal
constructor
A new instance of Literal.
- #perform ⇒ Object
Constructor Details
#initialize(value = nil) ⇒ Literal
Returns a new instance of Literal.
29 30 31 |
# File 'lib/gems/haml-2.0.4/lib/sass/constant/literal.rb', line 29 def initialize(value = nil) self.parse(value) if value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
41 42 43 |
# File 'lib/gems/haml-2.0.4/lib/sass/constant/literal.rb', line 41 def value @value end |
Class Method Details
Instance Method Details
#concat(other) ⇒ Object
37 38 39 |
# File 'lib/gems/haml-2.0.4/lib/sass/constant/literal.rb', line 37 def concat(other) Sass::Constant::String.from_value("#{self.to_s} #{other.to_s}") end |
#perform ⇒ Object
33 34 35 |
# File 'lib/gems/haml-2.0.4/lib/sass/constant/literal.rb', line 33 def perform self end |