Class: RTFM::TextSection

Inherits:
Struct
  • Object
show all
Defined in:
lib/rtfm/sections/text.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



2
3
4
# File 'lib/rtfm/sections/text.rb', line 2

def body
  @body
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



2
3
4
# File 'lib/rtfm/sections/text.rb', line 2

def title
  @title
end

Instance Method Details

#to_groffObject



3
4
5
6
7
8
# File 'lib/rtfm/sections/text.rb', line 3

def to_groff
  GroffString.groffify do |out|
    out.section title.to_s.upcase
    out << body.to_s
  end
end