cardname 0.7.0 → 0.8.0

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: c4f68e88b17664a0e42e06a9b8bc9fa46ddecd58
4
- data.tar.gz: 42ce5aeae5737ef4965354e3ee3f2aed0195787a
3
+ metadata.gz: 847e7b76c100fbc191a796e056625553d69d08af
4
+ data.tar.gz: c091a866677f866a6c433b5d2b4b780950118670
5
5
  SHA512:
6
- metadata.gz: 463ebbfcc12b2e842d7145fa0a8de4d797d065eb64d846d81e9cf95f71048d21431b4655ba466bf866f24624289012e1781e6d9690f35ff348e346e12cec7c43
7
- data.tar.gz: cad13b72125e41bb6d7d2dcca7edd4dbc6c6b52e4ca014ef6205611179055e675f0f998d8dcc028ab0c4ce5448b17d99f102bed4b79dd487db66777c42c066e0
6
+ metadata.gz: 9caaf55228f642035d5e02cf6bda5b881c4abd0da7b01703348fe0c51ef3a7f55f09560172fb9a95e70c34bed8580f7d9164a0e5c3999f5db89b9c57a49c2321
7
+ data.tar.gz: d18f0db2882846a35623009678f18e42f0eb689a9b4a77a55bc5af749eb2d62b9115a22c47426f9771551b475f5e0877fd7e4b2ce48fa28042bb2d2d5111a275
@@ -16,6 +16,12 @@ class Cardname
16
16
  end
17
17
  alias simple? simple
18
18
 
19
+ # @return true if name has more than one part
20
+ def compound?
21
+ !simple?
22
+ end
23
+ alias junction? compound?
24
+
19
25
  def part_keys
20
26
  @part_keys ||= simple ? [simple_key] : parts.map { |p| p.to_name.simple_key }
21
27
  end
@@ -1,10 +1,5 @@
1
1
  class Cardname
2
2
  module Predicates
3
- # @return true if name has more than one part
4
- def junction?
5
- !simple?
6
- end
7
-
8
3
  def valid?
9
4
  return true if self.class.nothing_banned?
10
5
  !parts.find do |pt|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cardname
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-04-11 00:00:00.000000000 Z
13
+ date: 2019-07-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport