Sha256: 03d2d3a775d2d6aefaa20c5e9580106c453cadc51c24fd53049da4b540a7a493

Contents?: true

Size: 1.02 KB

Versions: 6

Compression:

Stored size: 1.02 KB

Contents

# Copyright (c) 2020 Jerome Arbez-Gindre
# frozen_string_literal: true

module DefMastership
  # Contains regexp / action couples
  Filter = Struct.new(:regexp, :event, :consumed_line)
  private_constant :Filter

  FILTERS = [
    Filter.new(DMRegexp::VARIABLE_DEF,  :new_variable_def,     false),
    Filter.new(DMRegexp::VARIABLE_USE,  :new_variable_use,     false),
    Filter.new(DMRegexp::DEFINITION,    :new_definition,       true),
    Filter.new(DMRegexp::EREF_CONFIG,   :new_eref_setup,       true),
    Filter.new(DMRegexp::EREF_DEF,      :new_eref_def,         false),
    Filter.new(DMRegexp::IREF_DEF,      :new_iref_def,         false),
    Filter.new(DMRegexp::ATTR_CONFIG,   :new_attribute_conf,   true),
    Filter.new(DMRegexp::ATTR_SET,      :new_attribute_value,  false),
    Filter.new(DMRegexp::BLOCK,         :block_delimiter,      true),
    Filter.new(DMRegexp::EMPTY_LINE,    :empty_line,           false),
    Filter.new(DMRegexp::WHATEVER,      :new_line,             true)
  ].freeze
  private_constant :FILTERS
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
defmastership-1.0.19 lib/defmastership/filters.rb
defmastership-1.0.18 lib/defmastership/filters.rb
defmastership-1.0.17 lib/defmastership/filters.rb
defmastership-1.0.16 lib/defmastership/filters.rb
defmastership-1.0.15 lib/defmastership/filters.rb
defmastership-1.0.14 lib/defmastership/filters.rb