Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/tainbox/extensions.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'set'

class Class

attr_writer :tainbox_attributes
Expand All @@ -11,12 +13,11 @@ def tainbox_layer
end

def tainbox_attributes
@tainbox_attributes ||= []
@tainbox_attributes ||= Set.new
end

def tainbox_register_attribute(attribute)
tainbox_attributes << attribute
tainbox_attributes.uniq!
end
end

Expand All @@ -25,12 +26,11 @@ class Object
private

def tainbox_provided_attributes
@tainbox_provided_attributes ||= []
@tainbox_provided_attributes ||= Set.new
end

def tainbox_register_attribute_provided(attribute)
tainbox_provided_attributes << attribute
tainbox_provided_attributes.uniq!
end

def tainbox_unregister_attribute_provided(attribute)
Expand Down