Class: OrgMode::File

Inherits:
Object
  • Object
show all
Includes:
FileInterface
Defined in:
lib/org_mode.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from FileInterface

#scheduled_nodes, #select_by_title

Constructor Details

#initialize(header, root_nodes, footer) ⇒ File

Returns a new instance of File.



75
76
77
78
79
# File 'lib/org_mode.rb', line 75

def initialize(header, root_nodes, footer)
  @header = header
  @footer = footer
  @root_nodes = root_nodes
end

Instance Attribute Details

Returns the value of attribute footer.



65
66
67
# File 'lib/org_mode.rb', line 65

def footer
  @footer
end

#headerObject

Returns the value of attribute header.



65
66
67
# File 'lib/org_mode.rb', line 65

def header
  @header
end

#root_nodesObject Also known as: children

Returns the value of attribute root_nodes.



65
66
67
# File 'lib/org_mode.rb', line 65

def root_nodes
  @root_nodes
end

Instance Method Details

#nodesObject



81
82
83
# File 'lib/org_mode.rb', line 81

def nodes
  serialize_nodes(root_nodes)
end