Permalink
Browse files

Merge pull request #14 from mbj/freeze-config-adaption

Update objects to use new adamantium interface
  • Loading branch information...
2 parents 3e35430 + 135ff28 commit 3a6300d193697ffa80f6b3467db4fdaeca8870da @dkubb committed Nov 14, 2012
View
@@ -2,7 +2,7 @@
source 'https://rubygems.org'
-gem 'adamantium', '~> 0.0.2'
+gem 'adamantium', '~> 0.0.2', :git => 'https://github.com/dkubb/adamantium'
gem 'backports', '~> 2.6.4'
group :development do
View
@@ -1,3 +1,3 @@
---
threshold: 43
-total_score: 953
+total_score: 950
@@ -54,7 +54,7 @@ def self.assert_unique_aliases(aliases)
#
# @api public
def initialize(aliases)
- @aliases = Adamantium.freeze_object(aliases.to_hash)
+ @aliases = freeze_object(aliases.to_hash)
end
# Lookup the new attribute given the old attribute
View
@@ -130,7 +130,7 @@ def self.inherited(descendant)
# @api private
def initialize(name, options = {})
@name = name.to_sym
- @options = Adamantium.freeze_object(options.to_hash)
+ @options = freeze_object(options.to_hash)
@required = @options.fetch(:required, true)
end
@@ -29,7 +29,7 @@ def self.compare_method(enumerable)
#
# @api private
def initialize(left, right)
- super(left, Adamantium.freeze_object(right))
+ super(left, freeze_object(right))
end
# Evaluate the enumerable function using the tuple
View
@@ -73,7 +73,7 @@ def self.new(*args)
# @api private
def initialize(header, tuples)
@header = Header.coerce(header)
- @tuples = Adamantium.freeze_object(tuples)
+ @tuples = freeze_object(tuples)
end
# Lookup an Attribute in the header given an attribute name
@@ -31,7 +31,7 @@ class Base < Relation
# @api private
def initialize(name, header, tuples = Empty::ZERO_TUPLE)
super(header, tuples)
- @name = Adamantium.freeze_object(name.to_s)
+ @name = freeze_object(name.to_s)
end
end # class Base
@@ -100,7 +100,7 @@ def self.duplicate_names(names)
#
# @api public
def initialize(attributes)
- @attributes = Adamantium.freeze_object(attributes.to_ary)
+ @attributes = freeze_object(attributes.to_ary)
@attribute_for = Hash[@attributes.map { |attribute| attribute.name }.zip(@attributes)]
end
@@ -16,7 +16,7 @@ class Equalizer < Module
#
# @api private
def initialize(*keys)
- @keys = Adamantium.freeze_object(keys)
+ @keys = Adamantium::Freezer::Deep.call(keys)
define_methods
include_comparison_methods
end
@@ -37,8 +37,8 @@ module Binary
#
# @api private
def initialize(left, right)
- @left = Adamantium.freeze_object(left)
- @right = Adamantium.freeze_object(right)
+ @left = freeze_object(left)
+ @right = freeze_object(right)
end
end # module Binary
@@ -25,7 +25,7 @@ module Unary
#
# @api private
def initialize(operand)
- @operand = Adamantium.freeze_object(operand)
+ @operand = freeze_object(operand)
end
end # module Unary

0 comments on commit 3a6300d

Please sign in to comment.