Permalink
Browse files

Remove Attribute.primitive? method as it is no longer used

  • Loading branch information...
1 parent c61b455 commit b39e20a9b45ea37a2f77295dbbd572ee516504ee @solnic committed Jul 31, 2011
Showing with 0 additions and 28 deletions.
  1. +0 −12 lib/virtus/attribute.rb
  2. +0 −1 spec/unit/shared/attribute.rb
  3. +0 −15 spec/unit/shared/attribute/primitive.rb
View
12 lib/virtus/attribute.rb
@@ -8,18 +8,6 @@ class Attribute
extend TypeLookup
extend Options
- # Returns if the given value's class is an attribute's primitive
- #
- # @example
- # Virtus::Attribute::String.primitive?('String') # => true
- #
- # @return [Boolean]
- #
- # @api public
- def self.primitive?(value)
- value.kind_of?(primitive)
- end
-
# Returns name of the attribute
#
# @example
View
1 spec/unit/shared/attribute.rb
@@ -1,7 +1,6 @@
shared_examples_for 'Attribute' do
it_behaves_like 'Attribute.accept_options'
it_behaves_like 'Attribute.accepted_options'
- it_behaves_like 'Attribute.primitive?'
it_behaves_like 'Attribute#inspect'
it_behaves_like 'Attribute#set'
it_behaves_like 'Attribute#get'
View
15 spec/unit/shared/attribute/primitive.rb
@@ -1,15 +0,0 @@
-shared_examples_for 'Attribute.primitive?' do
- subject { described_class.primitive?(value) }
-
- let(:attribute) { described_class.new(attribute_name) }
-
- context 'with a primitive value' do
- let(:value) { attribute_value }
- it { should be(true) }
- end
-
- context 'with a non-primitive value' do
- let(:value) { nil }
- it { should be(false) }
- end
-end

0 comments on commit b39e20a

Please sign in to comment.