pincushion 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 217f846dde4bd0ec90ee69747c5e766fd841077f
4
- data.tar.gz: 5629f332f932df0ad0554860424f40c5fc3e0a70
3
+ metadata.gz: 2945e06d0233460a10e4b18b22244ce4a66d07e8
4
+ data.tar.gz: ba2df459865f6b16eac0c9c9d1adab6a3703ef70
5
5
  SHA512:
6
- metadata.gz: 1e89c6a58f94dc875efe71cfd32fbf682dcb02cda2a79220e53bf6b67adf8fccaaa5468df074394f52e80c2a31c4c40c4c199fa09f4023dbf82c1aa832c53a55
7
- data.tar.gz: f388bcaa354ca75e17d2d961e3767852b70c3c21d4b4c4b9eceb4cf587e43bee6a5ab3ab6845be8604ca309ef6f7ffe122c970e0aa5600abc5c0e83c7cdb2a1c
6
+ metadata.gz: de1f4128b9292f356a6a6ee5171c1da4f118a833059ca647e591df590d05e4070851bcf1fcd7dc24ee3343de836735d0fabce046b7f61c5ba22c73fd03e1b750
7
+ data.tar.gz: 405de72715d2305d32df5829d84c9238e3f9aade26c7ef7cdd1c451716ff0872a069dd08ed1af193facca7c5ce4a7721688769f003927ea5e195d2a2114f8b63
@@ -102,7 +102,7 @@ module Pincushion
102
102
  end
103
103
 
104
104
  def that_are(*preds)
105
- Pincushion.validate(self, preds)
105
+ Pincushion.validate(predicate_pincushion_root, preds)
106
106
  base = self
107
107
  mod = Module.new { include base }
108
108
  mod.is(*preds)
@@ -110,7 +110,7 @@ module Pincushion
110
110
  end
111
111
 
112
112
  def that_is(*preds)
113
- Pincushion.validate(self, preds)
113
+ Pincushion.validate(predicate_pincushion_root, preds)
114
114
  base = self
115
115
  klass = Class.new { include base }
116
116
  klass.is(*preds)
@@ -1,3 +1,3 @@
1
1
  module Pincushion
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end # module Pincushion
@@ -45,6 +45,9 @@ describe Pincushion do
45
45
  animals = Module.new { include Pincushion }
46
46
  animals.predicates :herbivore
47
47
 
48
+ elephants = animals.that_are(:herbivore)
49
+ tiny_elephants = elephants.that_is.named("Tree Trunks")
50
+
48
51
  assert_raises Pincushion::MissingPredicateError do
49
52
  animals.that_is(:carnivore)
50
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pincushion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Miller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-11 00:00:00.000000000 Z
11
+ date: 2016-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,4 +92,3 @@ summary: Predicate-centric classification toolkit
92
92
  test_files:
93
93
  - spec/pincushion_spec.rb
94
94
  - spec/spec_helper.rb
95
- has_rdoc: