Module: Mattock::Configurable::DirectoryStructure
- Included in:
- Mattock::ConfigurableTask, TaskLib
- Defined in:
- lib/mattock/configurable/directory-structure.rb
Overview
XXX Consider making the actual dir/path settings r/o Very easy to say
filename = "string"
rather than
filename.relative_path = "string"
and it isn’t clear which (abs/rel) you mean
Defined Under Namespace
Modules: ClassMethods Classes: StructurePath
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(sub) ⇒ Object
128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/mattock/configurable/directory-structure.rb', line 128 def self.included(sub) sub.extend ClassMethods dir_path = if not (file_path = ::Rake.application.rakefile).nil? File::dirname(File::(file_path)) elsif not (dir_path = ::Rake.application.original_dir).nil? dir_path else file_path = caller[0].split(':')[0] File::dirname(File::(file_path)) end sub.setting :absolute_path, dir_path end |
Instance Method Details
#resolve_paths ⇒ Object
142 143 144 |
# File 'lib/mattock/configurable/directory-structure.rb', line 142 def resolve_paths self.class.resolve_paths_on(self) end |