Class: Dressmaker::Configuration::FileRule::All

Inherits:
Dressmaker::Configuration::FileRule show all
Defined in:
lib/dressmaker/configuration/file_rule.rb

Instance Attribute Summary

Attributes inherited from Dressmaker::Configuration::FileRule

#action, #description, #directory, #name

Attributes inherited from Rule

#description, #informed

Instance Method Summary collapse

Methods inherited from Dressmaker::Configuration::FileRule

#execute!

Methods inherited from Rule

#inform, #informed?

Constructor Details

#initialize(&action) ⇒ All

Returns a new instance of All.



10
11
12
# File 'lib/dressmaker/configuration/file_rule.rb', line 10

def initialize(&action)
  @action = action
end

Instance Method Details

#matches?(base, target) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/dressmaker/configuration/file_rule.rb', line 14

def matches?(base, target)
  File.file?(File.join(base, target))
end