Class: Bade::AST::ValueNode

Inherits:
Node
  • Object
show all
Defined in:
lib/bade/ast/node/value_node.rb

Direct Known Subclasses

DoctypeNode

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #lineno, #type

Instance Method Summary collapse

Methods inherited from Node

#inspect, #to_s

Constructor Details

#initialize(*args) ⇒ ValueNode

Returns a new instance of ValueNode.



18
19
20
21
22
23
# File 'lib/bade/ast/node/value_node.rb', line 18

def initialize(*args)
  super

  @escaped = false
  @conditional = false
end

Instance Attribute Details

#conditionalBool

Returns:

  • (Bool)


16
17
18
# File 'lib/bade/ast/node/value_node.rb', line 16

def conditional
  @conditional
end

#escapedBool

Returns:

  • (Bool)


12
13
14
# File 'lib/bade/ast/node/value_node.rb', line 12

def escaped
  @escaped
end

#valueString

Returns:



8
9
10
# File 'lib/bade/ast/node/value_node.rb', line 8

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object

Parameters:



27
28
29
# File 'lib/bade/ast/node/value_node.rb', line 27

def ==(other)
  super && value == other.value && escaped == other.escaped && conditional == other.conditional
end