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 +4 -4
- data/lib/pincushion.rb +2 -2
- data/lib/pincushion/version.rb +1 -1
- data/spec/pincushion_spec.rb +3 -0
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2945e06d0233460a10e4b18b22244ce4a66d07e8
|
4
|
+
data.tar.gz: ba2df459865f6b16eac0c9c9d1adab6a3703ef70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de1f4128b9292f356a6a6ee5171c1da4f118a833059ca647e591df590d05e4070851bcf1fcd7dc24ee3343de836735d0fabce046b7f61c5ba22c73fd03e1b750
|
7
|
+
data.tar.gz: 405de72715d2305d32df5829d84c9238e3f9aade26c7ef7cdd1c451716ff0872a069dd08ed1af193facca7c5ce4a7721688769f003927ea5e195d2a2114f8b63
|
data/lib/pincushion.rb
CHANGED
@@ -102,7 +102,7 @@ module Pincushion
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def that_are(*preds)
|
105
|
-
Pincushion.validate(
|
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(
|
113
|
+
Pincushion.validate(predicate_pincushion_root, preds)
|
114
114
|
base = self
|
115
115
|
klass = Class.new { include base }
|
116
116
|
klass.is(*preds)
|
data/lib/pincushion/version.rb
CHANGED
data/spec/pincushion_spec.rb
CHANGED
@@ -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.
|
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
|
+
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:
|