Class: Yarrow::Content::Graph
- Inherits:
-
Object
- Object
- Yarrow::Content::Graph
- Defined in:
- lib/yarrow/content/graph.rb
Overview
A directed graph of every element of content in the project.
Class Method Summary collapse
-
.from_source(config) ⇒ Object
Construct a graph collected from source content files.
Instance Method Summary collapse
-
#directories ⇒ Object
List of source directories.
-
#files ⇒ Object
List of source files.
Class Method Details
.from_source(config) ⇒ Object
Construct a graph collected from source content files.
18 19 20 |
# File 'lib/yarrow/content/graph.rb', line 18 def self.from_source(config) new(SourceCollector.collect(config.input_dir)) end |
Instance Method Details
#directories ⇒ Object
List of source directories.
28 29 30 |
# File 'lib/yarrow/content/graph.rb', line 28 def directories graph.nodes(:directory) end |
#files ⇒ Object
List of source files.
23 24 25 |
# File 'lib/yarrow/content/graph.rb', line 23 def files graph.nodes(:file) end |