Class: Dressmaker::Configuration::Delegators
- Inherits:
-
Object
- Object
- Dressmaker::Configuration::Delegators
- Defined in:
- lib/dressmaker/configuration/delegators.rb
Defined Under Namespace
Classes: DirectoryDelegator, FileDelegator
Class Method Summary collapse
Class Method Details
.with(target) ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/dressmaker/configuration/delegators.rb', line 33 def self.with(target) target = target.path unless target.is_a?(String) if File.directory?(target) yield DirectoryDelegator.new(File.open(target)) elsif File.file?(target) yield FileDelegator.new(File.open(target)) else yield target end end |