Sha256: 606f37e69f163aab3cfa041d16bb7822cdbea2f1cc15cf269b248f3ad8f3018b

Contents?: true

Size: 688 Bytes

Versions: 1

Compression:

Stored size: 688 Bytes

Contents

# Placeholder class for marking keeping invalid Rules around for later
# inspection.
# It overwrited the entire public interface of {Matchd::Rule} to no-operations
class Matchd::Rule::Invalid < Matchd::Rule
  def initialize(options)
    @raw = options
  end
  attr_reader :raw

  # Noop
  # @return [FalseClass] Always returns `false` indecating that processing
  #   shall not stop.
  def visit(*); false end

  # Noop
  # @return [FalseClass] Always returns `false` indecating that this rule
  #   shall not be executed.
  def matches?(*); false end

  # Noop
  # @return [FalseClass] Always returns `false` indecating that processing
  #   shall not stop.
  def call(*); false end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
matchd-0.1.0 lib/matchd/rule/invalid.rb