anima 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/Changelog.md +4 -0
- data/anima.gemspec +1 -1
- data/config/flay.yml +1 -1
- data/lib/anima.rb +2 -2
- data/lib/anima/attribute.rb +1 -1
- data/spec/unit/anima/included_spec.rb +1 -1
- metadata +2 -2
data/.gitignore
CHANGED
data/Changelog.md
CHANGED
data/anima.gemspec
CHANGED
data/config/flay.yml
CHANGED
data/lib/anima.rb
CHANGED
@@ -5,7 +5,7 @@ require 'abstract_type'
|
|
5
5
|
|
6
6
|
# Main library namespace and mixin
|
7
7
|
class Anima < Module
|
8
|
-
include Adamantium::Flat
|
8
|
+
include Adamantium::Flat #, Equalizer.new(:attributes)
|
9
9
|
|
10
10
|
# Return names
|
11
11
|
#
|
@@ -157,7 +157,7 @@ private
|
|
157
157
|
# @api private
|
158
158
|
#
|
159
159
|
def define_attribute_hash_reader(scope)
|
160
|
-
scope.define_singleton_method(:
|
160
|
+
scope.define_singleton_method(:attributes_hash) do |object|
|
161
161
|
anima.attributes_hash(object)
|
162
162
|
end
|
163
163
|
end
|
data/lib/anima/attribute.rb
CHANGED
@@ -28,7 +28,7 @@ describe Anima, '#included' do
|
|
28
28
|
subject { target }
|
29
29
|
|
30
30
|
it 'should define attribute hash reader' do
|
31
|
-
target.
|
31
|
+
target.attributes_hash(instance).should eql(:foo => value)
|
32
32
|
end
|
33
33
|
|
34
34
|
its(:anima) { should be(object) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anima
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: backports
|