Class: Less::Node::String
- Includes:
- Literal
- Defined in:
- lib/less/engine/nodes/literal.rb
Overview
“hello world”
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#quotes ⇒ Object
readonly
Returns the value of attribute quotes.
Attributes included from Entity
Instance Method Summary collapse
-
#initialize(str) ⇒ String
constructor
A new instance of String.
- #to_css ⇒ Object
Methods included from Literal
Methods included from Entity
Constructor Details
#initialize(str) ⇒ String
Returns a new instance of String.
87 88 89 90 91 92 93 94 |
# File 'lib/less/engine/nodes/literal.rb', line 87 def initialize str @quotes, @content = unless str.nil? or str.empty? str.match(/('|")(.*?)(\1)/).captures rescue [nil, str] else [nil, ""] end super @content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
85 86 87 |
# File 'lib/less/engine/nodes/literal.rb', line 85 def content @content end |
#quotes ⇒ Object (readonly)
Returns the value of attribute quotes.
85 86 87 |
# File 'lib/less/engine/nodes/literal.rb', line 85 def quotes @quotes end |
Instance Method Details
#to_css ⇒ Object
96 97 98 |
# File 'lib/less/engine/nodes/literal.rb', line 96 def to_css "#@quotes#{@content}#@quotes" end |