Class: HerbNonTextNode

Inherits:
Object
  • Object
show all
Includes:
NonTextNode
Defined in:
lib/nodes/herb_non_text_node.rb

Direct Known Subclasses

CombindableHerbNonTextNode

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from NonTextNode

#contains_only_whitespace?, #extract_text, #text?, #top_level?, #white_space?

Methods included from BaseNode

#shatter?, #shattered_node_list

Constructor Details

#initialize(text) ⇒ HerbNonTextNode

Returns a new instance of HerbNonTextNode.



4
5
6
# File 'lib/nodes/herb_non_text_node.rb', line 4

def initialize( text )
  @text_value = text
end

Instance Attribute Details

#text_valueObject

Returns the value of attribute text_value.



3
4
5
# File 'lib/nodes/herb_non_text_node.rb', line 3

def text_value
  @text_value
end

Instance Method Details

#can_be_combined?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/nodes/herb_non_text_node.rb', line 8

def can_be_combined?
  false
end

#node_nameObject



12
13
14
# File 'lib/nodes/herb_non_text_node.rb', line 12

def node_name
  "non_text_node"
end

#to_sObject



16
17
18
# File 'lib/nodes/herb_non_text_node.rb', line 16

def to_s
  @text_value
end