unidom-price 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: c75e12e56ca3e86473e2a7aa901bbb6d572d4375
4
- data.tar.gz: a9bda6ba710a320dd033ba4ec599aa5fe59721ad
3
+ metadata.gz: 7806ecf665a86192aa2caab0df173c267e63ccce
4
+ data.tar.gz: 255d44b943b85da7e69f20069480f0f6129a0bc5
5
5
  SHA512:
6
- metadata.gz: 2fb5a5a334c087cef62849ccd0d385d37386a6566634ed21ca40666d78b3c9cbfe0de5b6630cc29c1a3767b03104c45e2a8b417ee26ff0bf15d140d249709604
7
- data.tar.gz: 1aab7bdb3ed4f1ae3e861c2a15bf2389f5c8161d656028bfc3d2b181b3add87bc40c4fb46f25cdeecd8135702bb7e62abdd557f5911974fb147007073df01705
6
+ metadata.gz: e05188a599f91d77ea70f814010d3b4ee7f62daef4853a5091bcb5ff3a2cdb299322849993be9cc8085dcdcfccbcb1bc8b3cbf7899ec2354bd46f1e3f4c5c9ee
7
+ data.tar.gz: 82de092227a8e18099508296e072421fe48f635d9c49c6aeb55a4efc0d6d1e788cb1fcbac2974820c4b8cc0fed587412295b5d79b9acd14e92b243bf8ce6dc48
data/README.md CHANGED
@@ -66,8 +66,10 @@ include Unidom::Price::Concerns::AsPricer
66
66
  The As Priced concern do the following tasks for the includer automatically:
67
67
  1. Define the has_many :prices macro as: ``has_many :prices, class_name: 'Unidom::Price::Price', as: :priced``
68
68
  2. Define the #is_priced! method as: ``is_priced!(amount, by: nil, at: Time.now)``
69
+ 3. Define the #is_priced? method as: ``is_priced?(at: Time.now)``
69
70
 
70
71
  ### As Pricer
71
72
  The As Priced concern do the following tasks for the includer automatically:
72
73
  1. Define the has_many :pricings macro as: ``has_many :pricings, class_name: 'Unidom::Price::Price', as: :pricer``
73
74
  2. Define the #price! method as: ``price!(it, amount, at: Time.now)``
75
+ 3. Define the #price? method as: ``price?(it, at: Time.now)``
@@ -12,9 +12,9 @@ module Unidom::Price::Concerns::AsPriced
12
12
  prices.create! pricer: by, amount: amount, opened_at: at
13
13
  end
14
14
 
15
- #def is_priced?(at: Time.now)
16
- # prices.valid_at(now: at).alive.exists?
17
- #end
15
+ def is_priced?(at: Time.now)
16
+ prices.valid_at(now: at).alive.exists?
17
+ end
18
18
 
19
19
  end
20
20
 
@@ -12,9 +12,9 @@ module Unidom::Price::Concerns::AsPricer
12
12
  pricings.create! priced: it, amount: amount, opened_at: at
13
13
  end
14
14
 
15
- #def price?(it, at: Time.now)
16
- # pricings.priced_is(it).valid_at(now: at).alive.exists?
17
- #end
15
+ def price?(it, at: Time.now)
16
+ pricings.priced_is(it).valid_at(now: at).alive.exists?
17
+ end
18
18
 
19
19
  end
20
20
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Price
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-price
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-10 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