Removed NodeNameSet class

This commit is contained in:
Yorick Peterse 2015-05-17 21:59:43 +02:00
parent cec8798694
commit 132d112f5f
3 changed files with 0 additions and 30 deletions

View File

@ -7,7 +7,6 @@ require_relative 'oga/version'
require_relative 'oga/oga'
require_relative 'oga/lru'
require_relative 'oga/entity_decoder'
require_relative 'oga/node_name_set'
require_relative 'oga/blacklist'
require_relative 'oga/whitelist'

View File

@ -1,18 +0,0 @@
module Oga
##
# Class for storing (HTML) element names in a set and automatically adding
# their uppercase equivalents.
#
# @api private
#
class NodeNameSet < Set
##
# @param [Array] values
#
def initialize(values = [])
values = values + values.map(&:upcase)
super(values)
end
end # NodeNameSet
end # Oga

View File

@ -1,11 +0,0 @@
require 'spec_helper'
describe Oga::NodeNameSet do
describe '#initialize' do
it 'adds uppercase equivalents of the input strings' do
set = described_class.new(%w{foo bar})
set.to_a.should == %w{foo bar FOO BAR}
end
end
end