class Gurke::Configuration::Inclusion

@api private

Attributes

mod[R]
opts[R]

Public Class Methods

new(mod, opts) click to toggle source
# File lib/gurke/configuration.rb, line 106
def initialize(mod, opts)
  @mod  = mod
  @opts = opts
end

Public Instance Methods

match?(tags) click to toggle source
# File lib/gurke/configuration.rb, line 119
def match?(tags)
  return true if self.tags.empty?

  self.tags.each do |tag|
    return true if tags.include?(tag.to_s)
  end

  false
end
tags() click to toggle source
# File lib/gurke/configuration.rb, line 111
def tags
  @tags ||= begin
    tags = opts.fetch(:tags, [])
    tags = [tags] unless tags.is_a?(Array)
    tags
  end
end