Class: Statique::Discover
- Inherits:
-
Object
- Object
- Statique::Discover
- Defined in:
- lib/statique/discover.rb
Constant Summary collapse
- SUPPORTED_EXTENSIONS =
%w[ slim md builder ].freeze
- GLOB =
"**/*.{#{SUPPORTED_EXTENSIONS.join(",")}}"
Instance Attribute Summary collapse
-
#collections ⇒ Object
readonly
Returns the value of attribute collections.
-
#documents ⇒ Object
readonly
Returns the value of attribute documents.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
Instance Method Summary collapse
-
#initialize(root, statique) ⇒ Discover
constructor
A new instance of Discover.
Constructor Details
#initialize(root, statique) ⇒ Discover
Returns a new instance of Discover.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/statique/discover.rb', line 17 def initialize(root, statique) @root = root @documents = [] @collections = Hashie::Mash.new { |hash, key| hash[key] = Set.new } @statique = statique discover_files! discover! @statique.mode.build do @files.freeze @documents.freeze @collections.freeze end watch_for_changes if @statique.mode.server? end |
Instance Attribute Details
#collections ⇒ Object (readonly)
Returns the value of attribute collections.
7 8 9 |
# File 'lib/statique/discover.rb', line 7 def collections @collections end |
#documents ⇒ Object (readonly)
Returns the value of attribute documents.
7 8 9 |
# File 'lib/statique/discover.rb', line 7 def documents @documents end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
7 8 9 |
# File 'lib/statique/discover.rb', line 7 def files @files end |