Class: Dressmaker::Configuration::FileRule

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

Direct Known Subclasses

All

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

#actionObject (readonly)

Returns the value of attribute action.



19
20
21
# File 'lib/dressmaker/configuration/file_rule.rb', line 19

def action
  @action
end

#descriptionObject

Returns the value of attribute description.



20
21
22
# File 'lib/dressmaker/configuration/file_rule.rb', line 20

def description
  @description
end

#directoryObject (readonly)

Returns the value of attribute directory.



19
20
21
# File 'lib/dressmaker/configuration/file_rule.rb', line 19

def directory
  @directory
end

#nameObject

Returns the value of attribute name.



20
21
22
# File 'lib/dressmaker/configuration/file_rule.rb', line 20

def name
  @name
end

Instance Method Details

#execute!(target) ⇒ Object



34
35
36
37
38
# File 'lib/dressmaker/configuration/file_rule.rb', line 34

def execute!(target)
  Delegators.with(target) do |file|
    action.call(file)
  end
end