Class: Matchd::Rule::Invalid

Inherits:
Matchd::Rule show all
Defined in:
lib/matchd/rule/invalid.rb

Overview

Placeholder class for marking keeping invalid Rules around for later inspection. It overwrited the entire public interface of Matchd::Rule to no-operations

Constant Summary

Constants inherited from Matchd::Rule

NotImplementedError, REGEXP_MATCHER, REGEXP_OPTIONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Matchd::Rule

#match_name, #match_resource_classes, parse_match, parse_resource_class, #visit!

Constructor Details

#initialize(options) ⇒ Invalid

Returns a new instance of Invalid.



5
6
7
# File 'lib/matchd/rule/invalid.rb', line 5

def initialize(options)
  @raw = options
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



8
9
10
# File 'lib/matchd/rule/invalid.rb', line 8

def raw
  @raw
end

Instance Method Details

#callFalseClass

Noop

Returns:

  • (FalseClass)

    Always returns ‘false` indecating that processing shall not stop.



23
# File 'lib/matchd/rule/invalid.rb', line 23

def call(*); false end

#matches?FalseClass

Noop

Returns:

  • (FalseClass)

    Always returns ‘false` indecating that this rule shall not be executed.



18
# File 'lib/matchd/rule/invalid.rb', line 18

def matches?(*); false end

#visitFalseClass

Noop

Returns:

  • (FalseClass)

    Always returns ‘false` indecating that processing shall not stop.



13
# File 'lib/matchd/rule/invalid.rb', line 13

def visit(*); false end