From 132d112f5fc33abca8991aa6d19733df079dc33e Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Sun, 17 May 2015 21:59:43 +0200 Subject: [PATCH] Removed NodeNameSet class --- lib/oga.rb | 1 - lib/oga/node_name_set.rb | 18 ------------------ spec/oga/node_name_set_spec.rb | 11 ----------- 3 files changed, 30 deletions(-) delete mode 100644 lib/oga/node_name_set.rb delete mode 100644 spec/oga/node_name_set_spec.rb diff --git a/lib/oga.rb b/lib/oga.rb index 414dc2a..acf4b44 100644 --- a/lib/oga.rb +++ b/lib/oga.rb @@ -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' diff --git a/lib/oga/node_name_set.rb b/lib/oga/node_name_set.rb deleted file mode 100644 index 75c794c..0000000 --- a/lib/oga/node_name_set.rb +++ /dev/null @@ -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 diff --git a/spec/oga/node_name_set_spec.rb b/spec/oga/node_name_set_spec.rb deleted file mode 100644 index ee0c374..0000000 --- a/spec/oga/node_name_set_spec.rb +++ /dev/null @@ -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