class Oga::Blacklist

@api private

Attributes

names[R]

@return [Set]

Public Class Methods

new(names) click to toggle source

@param [Array] names

# File lib/oga/blacklist.rb, line 8
def initialize(names)
  @names = Set.new(names + names.map(&:upcase))
end

Public Instance Methods

+(other) click to toggle source

@param [Oga::Blacklist] other @return [Oga::Blacklist]

# File lib/oga/blacklist.rb, line 26
def +(other)
  self.class.new(names + other.names)
end
allow?(name) click to toggle source

@return [TrueClass|FalseClass]

# File lib/oga/blacklist.rb, line 20
def allow?(name)
  !names.include?(name)
end
each() { |value| ... } click to toggle source

@yieldparam [String]

# File lib/oga/blacklist.rb, line 13
def each
  names.each do |value|
    yield value
  end
end