Class: Drydock::IgnorefileDefinition::Rule

Inherits:
Struct
  • Object
show all
Defined in:
lib/drydock/ignorefile_definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#excludeObject Also known as: exclude?

Returns the value of attribute exclude

Returns:

  • (Object)

    the current value of exclude



4
5
6
# File 'lib/drydock/ignorefile_definition.rb', line 4

def exclude
  @exclude
end

#patternObject

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



4
5
6
# File 'lib/drydock/ignorefile_definition.rb', line 4

def pattern
  @pattern
end

Instance Method Details

#match?(test) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/drydock/ignorefile_definition.rb', line 7

def match?(test)
  File.fnmatch?(pattern, test)
end