Class: DruidTools::AccessDruid
- Defined in:
- lib/druid_tools/access_druid.rb
Overview
Overrides the Druid#tree method
Constant Summary
Constants inherited from Druid
Instance Attribute Summary
Attributes inherited from Druid
Instance Method Summary collapse
-
#path(extra = nil, create = false) ⇒ Object
all content lives in the base druid directory.
- #tree ⇒ Object
Methods inherited from Druid
#base_pathname, #find, #find_filelist_parent, glob, #id, #initialize, #mkdir, #mkdir_with_final_link, #pathname, pattern, #prune!, #prune_ancestors, #rmdir, strict_glob, valid?
Constructor Details
This class inherits a constructor from DruidTools::Druid
Instance Method Details
#path(extra = nil, create = false) ⇒ Object
all content lives in the base druid directory
13 14 15 16 17 |
# File 'lib/druid_tools/access_druid.rb', line 13 def path(extra = nil, create = false) result = File.join(*[base, tree].compact) mkdir(extra) if create && !File.exist?(result) result end |
#tree ⇒ Object
8 9 10 |
# File 'lib/druid_tools/access_druid.rb', line 8 def tree @druid.scan(self.class.pattern).flatten end |