Class: RD::NonterminalInline
- Inherits:
-
InlineElement
- Object
- Element
- InlineElement
- RD::NonterminalInline
- Includes:
- NonterminalElement
- Defined in:
- lib/rd/inline-element.rb
Overview
abstract class.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Attributes included from NonterminalElement
Attributes inherited from Element
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize ⇒ NonterminalInline
constructor
A new instance of NonterminalInline.
- #to_label ⇒ Object
Methods included from NonterminalElement
#add_child, #add_child_under_document_struct, #add_children, #add_children_under_document_struct, #add_children_without_document_struct, #build, #each_child, #each_element, #make_child, #push_to_children, #under_temporary_document_structure
Methods inherited from Element
Constructor Details
#initialize ⇒ NonterminalInline
Returns a new instance of NonterminalInline.
27 28 29 30 |
# File 'lib/rd/inline-element.rb', line 27 def initialize super() @content = [] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
25 26 27 |
# File 'lib/rd/inline-element.rb', line 25 def content @content end |
Instance Method Details
#children ⇒ Object
32 33 34 |
# File 'lib/rd/inline-element.rb', line 32 def children @content end |
#to_label ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/rd/inline-element.rb', line 36 def to_label ret = "" children.each do |i| ret << i.to_label end ret.strip end |