Class: OrgMode::FileCollection
- Inherits:
-
Object
- Object
- OrgMode::FileCollection
- Includes:
- FileInterface
- Defined in:
- lib/org_mode.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
Returns the value of attribute files.
Instance Method Summary collapse
-
#initialize(files) ⇒ FileCollection
constructor
A new instance of FileCollection.
- #nodes ⇒ Object
- #root_nodes ⇒ Object
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
#files ⇒ Object
Returns the value of attribute files.
97 98 99 |
# File 'lib/org_mode.rb', line 97 def files @files end |
Instance Method Details
#nodes ⇒ Object
105 106 107 |
# File 'lib/org_mode.rb', line 105 def nodes files.map(&:nodes).flatten end |
#root_nodes ⇒ Object
109 110 111 |
# File 'lib/org_mode.rb', line 109 def root_nodes nodes.select(&:root_node?) end |