Class: Propolize::HeadingChunk

Inherits:
Object
  • Object
show all
Defined in:
lib/propolize.rb

Overview

A heading chunk is a group of two lines, the second of which is repeated ‘-’ characters (i.e. the underlining of the heading)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ HeadingChunk

Returns a new instance of HeadingChunk.



804
805
806
# File 'lib/propolize.rb', line 804

def initialize(text)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



803
804
805
# File 'lib/propolize.rb', line 803

def text
  @text
end

Instance Method Details

#getDocumentComponentObject



812
813
814
# File 'lib/propolize.rb', line 812

def getDocumentComponent
  return Heading.new(text)
end

#to_sObject



808
809
810
# File 'lib/propolize.rb', line 808

def to_s
  return "HeadingChunk: #{text.inspect}"
end