Removed NodeNameSet class
This commit is contained in:
parent
cec8798694
commit
132d112f5f
|
@ -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'
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue