Class: OrgMode::FileCollection

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(files) ⇒ FileCollection

Returns a new instance of FileCollection.



101
102
103
# File 'lib/org_mode.rb', line 101

def initialize(files)
  @files = files 
end

Instance Attribute Details

#filesObject

Returns the value of attribute files.



97
98
99
# File 'lib/org_mode.rb', line 97

def files
  @files
end

Instance Method Details

#nodesObject



105
106
107
# File 'lib/org_mode.rb', line 105

def nodes
  files.map(&:nodes).flatten
end

#root_nodesObject



109
110
111
# File 'lib/org_mode.rb', line 109

def root_nodes
  nodes.select(&:root_node?)
end