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, #create_deletes_dir, #creates_delete_record, #deletes_delete_record, #deletes_dir_exists?, #deletes_dir_pathname, #deletes_record_exists?, #deletes_record_pathname, #find, #find_filelist_parent, glob, #id, #initialize, #mkdir, #mkdir_with_final_link, #pathname, pattern, #prep_deletes_dir, #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
14 15 16 17 18 |
# File 'lib/druid_tools/access_druid.rb', line 14 def path(extra=nil, create=false) result = File.join(*([base,tree].compact)) mkdir(extra) if create and not File.exists?(result) result end |
#tree ⇒ Object
9 10 11 |
# File 'lib/druid_tools/access_druid.rb', line 9 def tree @druid.scan(self.class.pattern).flatten end |