Class: Henitai::MutationSkipDirectives::Directive

Inherits:
Data
  • Object
show all
Defined in:
lib/henitai/mutation_skip_directives.rb

Overview

A parsed directive: operators is nil (all) or a Set of canonical operator names; reason is optional free text shown in reports.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#operatorsObject (readonly)

Returns the value of attribute operators

Returns:

  • (Object)

    the current value of operators



32
33
34
# File 'lib/henitai/mutation_skip_directives.rb', line 32

def operators
  @operators
end

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



32
33
34
# File 'lib/henitai/mutation_skip_directives.rb', line 32

def reason
  @reason
end

Instance Method Details

#match?(operator) ⇒ Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/henitai/mutation_skip_directives.rb', line 33

def match?(operator)
  operators.nil? || operators.include?(operator.to_s)
end