Class: Sanctify::Matcher

Inherits:
Object
  • Object
show all
Defined in:
lib/sanctify/matcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, description, regex, disabled: false) ⇒ Matcher

Returns a new instance of Matcher.



4
5
6
7
8
9
# File 'lib/sanctify/matcher.rb', line 4

def initialize(id, description, regex, disabled: false)
  @id = id
  @description = description
  @regex = regex
  @disabled = disabled
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/sanctify/matcher.rb', line 3

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/sanctify/matcher.rb', line 3

def id
  @id
end

#regexObject (readonly)

Returns the value of attribute regex.



3
4
5
# File 'lib/sanctify/matcher.rb', line 3

def regex
  @regex
end

Instance Method Details

#disabled?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/sanctify/matcher.rb', line 11

def disabled?
  @disabled
end