unidom-standard 1.2 → 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: 0d089cfe024b797df5ef3c97e9ef80727a2e580d
4
- data.tar.gz: 90c396b43e2b4508a84009cfd1319b48145b69de
3
+ metadata.gz: 113814c02dc233f2dbc19941603bdb6e019eb813
4
+ data.tar.gz: 1f56fead8bc694f3598b67386e8d882fd7ab3a8b
5
5
  SHA512:
6
- metadata.gz: 7a5b0c57bd3da3b3f3d4208f1964f05eae536e93c4598a318c76bede4a2c86aa3030aa6f395955979f2d4e341854548337fefe7274715c88433abc2a148b2805
7
- data.tar.gz: 6f426bdebc2e020ed49417d7dde35bc1069bd22d21cf3208392163c970be8292940917bef707256cf850309b6ad9ce6068eea06c018f02e9e58fa7c5424b1811
6
+ metadata.gz: 54c9fb53ed175c40e27eecc15fa7310de10694ac2a36c265a912b5ee5070f36fec191849582ab309b957df13f22748098ffa38036df9e2ed661093b4a8a7478b
7
+ data.tar.gz: 4c16e96fce26a1059e5c944db31af668b3c5f67986196f8aadd158c358cc53765212de49d851f38c9995bc250ca911652d9e910227117986d0215cdaf64b30d4
data/README.md CHANGED
@@ -46,9 +46,11 @@ The As Source Standard concern do the following tasks for the includer automatic
46
46
  1. Define the has_many :target_associatings macro as: ``has_many :target_associatings, class_name: 'Unidom::Standard::StandardAssociating', foreign_key: :source_id``
47
47
  2. Define the has_many :target_standards macro as: ``has_many :target_standards, through: :target_associatings, source: :target``
48
48
  3. Define the #associate! method as: ``associate!(target, due_to: 'REVS', at: Time.now)``
49
+ 4. Define the #associate? method as: ``associate?(target, due_to: 'REVS', at: Time.now)``
49
50
 
50
51
  ### As Target Standard concern
51
52
  The As Target Standard concern do the following tasks for the includer automatically:
52
53
  1. Define the has_many :source_associatings macro as: ``has_many :source_associatings, class_name: 'Unidom::Standard::StandardAssociating', foreign_key: :target_id``
53
54
  2. Define the has_many :source_standards macro as: ``has_many :source_standards, through: :source_associatings, source: :source``
54
55
  3. Define the #is_associated! method as: ``is_associated!(source, due_to: 'REVS', at: Time.now)``
56
+ 4. Define the #is_associated? method as: ``is_associated?(source, due_to: 'REVS', at: Time.now)``
@@ -11,9 +11,9 @@ module Unidom::Standard::Concerns::AsSourceStandard
11
11
  target_associatings.target_is(target).association_coded_as(due_to).valid_at(now: at).alive.first_or_create! opened_at: at
12
12
  end
13
13
 
14
- #def associate?(target, due_to: 'REVS', at: Time.now)
15
- # target_associatings.target_is(target).association_coded_as(due_to).valid_at(now: at).alive.exists?
16
- #end
14
+ def associate?(target, due_to: 'REVS', at: Time.now)
15
+ target_associatings.target_is(target).association_coded_as(due_to).valid_at(now: at).alive.exists?
16
+ end
17
17
 
18
18
  end
19
19
 
@@ -11,9 +11,9 @@ module Unidom::Standard::Concerns::AsTargetStandard
11
11
  source_associatings.source_is(source).association_coded_as(due_to).valid_at(now: at).alive.first_or_create! opened_at: at
12
12
  end
13
13
 
14
- #def is_associated?(source, due_to: 'REVS', at: Time.now)
15
- # source_associatings.source_is(source).association_coded_as(due_to).valid_at(now: at).alive.exists?
16
- #end
14
+ def is_associated?(source, due_to: 'REVS', at: Time.now)
15
+ source_associatings.source_is(source).association_coded_as(due_to).valid_at(now: at).alive.exists?
16
+ end
17
17
 
18
18
  end
19
19
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Standard
3
- VERSION = '1.2'.freeze
3
+ VERSION = '1.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-standard
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: '1.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-13 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common