class Orgy::OrgHeadline

OrgHeader

Org-mode headline

Public Class Methods

new( headline ) click to toggle source

Takes one argument in the form of a string

Calls superclass method Orgy::OrgData::new
# File lib/orgy/org_headline.rb, line 9
def initialize( headline )
  super()
  @data = Hash.new
  @data[:headline] = headline.to_s

  @indent_delimiter = "*"
end

Public Instance Methods

to_s() click to toggle source

Print headline and its children to a string

Calls superclass method Orgy::OrgObject#to_s
# File lib/orgy/org_headline.rb, line 18
def to_s
  str = ""
  @indent.times{ str << @indent_delimiter }
  str << ' ' << @data[:headline].to_s
  str << super << "\n"
  #if @indent == 1 then str << "\n" end
end