Class: Whisper::DirSet
- Inherits:
-
Object
- Object
- Whisper::DirSet
- Includes:
- Dependency, Loggy
- Defined in:
- lib/whisper/dir_set.rb
Overview
maintains a set of things from a directory, where each thing is has both a .yaml and .textile file.
Instance Method Summary collapse
- #dependencies ⇒ Object
-
#initialize(dir, klass) ⇒ DirSet
constructor
A new instance of DirSet.
- #size ⇒ Object
- #things ⇒ Object
Methods included from Dependency
#content, #dependency_init, #refresh!, #timestamp
Constructor Details
#initialize(dir, klass) ⇒ DirSet
Returns a new instance of DirSet.
12 13 14 15 16 17 |
# File 'lib/whisper/dir_set.rb', line 12 def initialize dir, klass @scanner = DirScanner.new dir, /(#{Regexp.escape ENTRY_METADATA_EXTENSION}|#{Regexp.escape ENTRY_CONTENT_EXTENSION})$/ @klass = klass dependency_init end |
Instance Method Details
#dependencies ⇒ Object
19 |
# File 'lib/whisper/dir_set.rb', line 19 def dependencies; [@scanner] end |
#size ⇒ Object
21 |
# File 'lib/whisper/dir_set.rb', line 21 def size; things.size end |
#things ⇒ Object
20 |
# File 'lib/whisper/dir_set.rb', line 20 def things; content end |