mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Remove newly-redundant OrderedSet
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
module ActiveModel
|
||||
class OrderedSet
|
||||
def initialize(array)
|
||||
@array = array
|
||||
@hash = {}
|
||||
|
||||
array.each do |item|
|
||||
@hash[item] = true
|
||||
end
|
||||
end
|
||||
|
||||
def merge!(other)
|
||||
other.each do |item|
|
||||
next if @hash.key?(item)
|
||||
|
||||
@hash[item] = true
|
||||
@array.push item
|
||||
end
|
||||
end
|
||||
|
||||
def to_a
|
||||
@array
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,6 +1,5 @@
|
||||
require "active_support/core_ext/class/attribute"
|
||||
require "active_support/core_ext/module/anonymous"
|
||||
require "set"
|
||||
|
||||
module ActiveModel
|
||||
# Active Model Serializer
|
||||
|
||||
Reference in New Issue
Block a user