Class: Dressmaker::Configuration::DirectoryRule

Inherits:
Rule
  • Object
show all
Defined in:
lib/dressmaker/configuration/directory_rule.rb

Direct Known Subclasses

All, Pattern

Defined Under Namespace

Classes: All, Pattern

Instance Attribute Summary collapse

Attributes inherited from Rule

#informed

Instance Method Summary collapse

Methods inherited from Rule

#inform, #informed?

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



31
32
33
# File 'lib/dressmaker/configuration/directory_rule.rb', line 31

def description
  @description
end

#nameObject

Returns the value of attribute name.



31
32
33
# File 'lib/dressmaker/configuration/directory_rule.rb', line 31

def name
  @name
end

Instance Method Details

#execute!(target) ⇒ Object



33
34
35
36
37
# File 'lib/dressmaker/configuration/directory_rule.rb', line 33

def execute!(target)
  Delegators.with(File.join(target)) do |dir|
    action.call(dir)
  end
end