Sha256: a76589863558085064ab81b5b1cee332dfffe2c819164cce0bd8bee135b044ea

Contents?: true

Size: 582 Bytes

Versions: 2

Compression:

Stored size: 582 Bytes

Contents

class Dressmaker
  class Configuration
    class DirectoryMatcher < Matcher
      
      attr_reader :configuration
      
      def initialize(configuration)
        @configuration = configuration
      end
      
      def matches(pattern, &block)
        rule = DirectoryRule::Pattern.new(pattern, &block)
        update_description_on_rule(rule)
        configuration.rules << rule
      end
      
      def all(&block)
        rule = DirectoryRule::All.new(&block)
        update_description_on_rule(rule)
        configuration.rules << rule
      end
      
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dressmaker-0.0.3 lib/dressmaker/configuration/directory_matcher.rb
dressmaker-0.0.2 lib/dressmaker/configuration/directory_matcher.rb