Class: Sass::Tree::ValueNode

Inherits:
Node show all
Defined in:
lib/gems/haml-2.0.4/lib/sass/css.rb,
lib/gems/haml-2.0.4/lib/sass/tree/value_node.rb

Direct Known Subclasses

AttrNode, CommentNode, DirectiveNode, RuleNode

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #filename, #line

Instance Method Summary collapse

Methods inherited from Node

#<<

Constructor Details

#initialize(value, style) ⇒ ValueNode

Returns a new instance of ValueNode.



7
8
9
10
# File 'lib/gems/haml-2.0.4/lib/sass/tree/value_node.rb', line 7

def initialize(value, style)
  @value = value
  super(style)
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/gems/haml-2.0.4/lib/sass/tree/value_node.rb', line 5

def value
  @value
end

Instance Method Details

#to_s(tabs = 0) ⇒ Object



12
13
14
# File 'lib/gems/haml-2.0.4/lib/sass/tree/value_node.rb', line 12

def to_s(tabs = 0)
  value
end

#to_sass(tabs, opts = {}) ⇒ Object



21
22
23
# File 'lib/gems/haml-2.0.4/lib/sass/css.rb', line 21

def to_sass(tabs, opts = {})
  "#{value}\n"
end