collectable 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmVlOWE3ZjExY2M5MmJjMzU4ZWIzNjcwNGNkNjNiZTViYjZhZGU3NA==
4
+ MmU1ZGIxYTY3YmRkOGQ0ODkxZWYyYTM2NDI4NzE2YWY3NTA1YTY3Ng==
5
5
  data.tar.gz: !binary |-
6
- MzcxZGNkOTkzYWNhZWNhYjliMjdiOWMyMjIwYWJjYjc4NmRiNGQzMg==
6
+ ZWRiNTQ1NDVkMjA3ZmJiZGFkM2JkMTg5NDhkMTNhYThiMThlOTVjYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Njc4MjFlZThmZTFkY2JmNTc2N2U4OTZhZDg1YzMxZjA3ZWQ5MGQ4NDcwYjYx
10
- ZmRkYjZjZWExYzFlOWRkMWZhZDkwNTQzNDk2ODkxZTVhODJlNTRlNTk3Njkw
11
- ZDJkZWFjOTllYzg1MmVhYzE2ZTk0ZTY0ZjBhMjM5OWU0OGU1M2Q=
9
+ Yjk0NzUzYzg4Y2Q4M2FmYTgxMmUzMTdiYWMyMDQ0Yjk1MzYwY2I3MmNjODcx
10
+ NDE5YmJmYWY1ZTNkZDU5YmQxNWI5ZGU5OGY1ZDY1YjdmMTVhYzUzZjI2Nzc1
11
+ NGUzNjc5OWVhMjJmMTgyMDQ0MjI3OGI4YTEwM2IwZWJmYmFjNjg=
12
12
  data.tar.gz: !binary |-
13
- YmU1YTNiYTkxMzY5MmYxMTllYTcyZmRjN2U2YmQxNGQ5YWUzZTkxMDQxY2Rk
14
- NzJmNDUwOGJhNzJjOGU2NTc3OTIxNTY4Y2JhODVjMzU1ZGVkYjJlY2RmOTM2
15
- MTBhYTE3ZGQ5N2NmNGEzMjIyYTAyY2QxMmUyOTFkMTVlNTY0MzY=
13
+ MWNhODlmZGRjYjEzNmE5MmIwNzE1ZmRjYmIwY2Y5NDkwOTcxZTJkZTYxZDgx
14
+ NTZhZGZhNWE3OTE0ODMwZmU0YjNlNTBjMDZhYTI3NGIzYmI1MTIwNTQ4ZGMy
15
+ MGJjZmRhNWE0N2Y1YTZiMjNjYzcwNjlmMjBjYTBmMGE4NTc4ZDE=
data/README.md CHANGED
@@ -55,6 +55,7 @@ Do you use git-flow? I sure do. Please base anything you do off of
55
55
 
56
56
  ## History ##
57
57
 
58
+ * 0.0.3 - .value and .name actually added
58
59
  * 0.0.2 - Renamed collected_item#val to collected_item#value
59
60
  * 0.0.1 - Public release
60
61
 
@@ -1,3 +1,3 @@
1
1
  module Collectable
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
data/lib/collectable.rb CHANGED
@@ -6,6 +6,14 @@ module Collectable
6
6
  end
7
7
 
8
8
  module ClassMethods
9
+ def value
10
+ :value
11
+ end
12
+
13
+ def name
14
+ :name
15
+ end
16
+
9
17
  def traits
10
18
  @traits ||= []
11
19
  end
@@ -34,6 +34,26 @@ describe Collectable do
34
34
  it 'knows how to collect the traits' do
35
35
  expect(dummy).to respond_to(:collected)
36
36
  end
37
+
38
+ it 'knows what method gets a value for a collected trait' do
39
+ expect(dummy).to respond_to(:value)
40
+ end
41
+
42
+ it 'knows what method gets a name for a collected trait' do
43
+ expect(dummy).to respond_to(:name)
44
+ end
45
+ end
46
+
47
+ describe '.value' do
48
+ it 'is :value' do
49
+ expect(Dummy.value).to eql(:value)
50
+ end
51
+ end
52
+
53
+ describe '.name' do
54
+ it 'is :name' do
55
+ expect(Dummy.name).to eql(:name)
56
+ end
37
57
  end
38
58
 
39
59
  describe '.trait' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collectable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Walters