Class: Dressmaker::Configuration::DirectoryMatcher
- Defined in:
- lib/dressmaker/configuration/directory_matcher.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Instance Method Summary collapse
- #all(&block) ⇒ Object
-
#initialize(configuration) ⇒ DirectoryMatcher
constructor
A new instance of DirectoryMatcher.
- #matches(pattern, &block) ⇒ Object
Methods inherited from Matcher
Constructor Details
#initialize(configuration) ⇒ DirectoryMatcher
Returns a new instance of DirectoryMatcher.
7 8 9 |
# File 'lib/dressmaker/configuration/directory_matcher.rb', line 7 def initialize(configuration) @configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
5 6 7 |
# File 'lib/dressmaker/configuration/directory_matcher.rb', line 5 def configuration @configuration end |
Instance Method Details
#all(&block) ⇒ Object
17 18 19 20 21 |
# File 'lib/dressmaker/configuration/directory_matcher.rb', line 17 def all(&block) rule = DirectoryRule::All.new(&block) update_description_on_rule(rule) configuration.rules << rule end |
#matches(pattern, &block) ⇒ Object
11 12 13 14 15 |
# File 'lib/dressmaker/configuration/directory_matcher.rb', line 11 def matches(pattern, &block) rule = DirectoryRule::Pattern.new(pattern, &block) update_description_on_rule(rule) configuration.rules << rule end |