cash_register 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: 3a4744d93e1d16cd07ab61f60f62114d07017061
4
- data.tar.gz: dd33f6a425548922830a310dba18872cd18ba456
3
+ metadata.gz: ed95e4c3a666a067ff2f2efca33f2d340ea0ad8e
4
+ data.tar.gz: eeea8eb2e1789827a1956e5f7e2ff739a4487e9c
5
5
  SHA512:
6
- metadata.gz: 209a32e2b19a1a3ba28dcd7a95d72cb7eb9e3f686abf9ec779b2b21bc0ba032264ede494f8b57baf80cd16385c9abed636d2c56df4ea726b91db5b2b10fcecce
7
- data.tar.gz: 34a53f46108707a4665f0dd9ee6a23835524f9b3dff3f61a287560f3ad2bca27b387d26d52bccd426aaabe25f87b62e5e00a3696fe155336bbb33dc7e124198c
6
+ metadata.gz: 92d87622e0e5eb2a58426756794e027d8fe80683ab6540915c97f51f3a396847d1d73a3c1f625dc833b9fff57b563f5963f0988cd7d9b035076223c4b3d440b0
7
+ data.tar.gz: 873bd50bfa0a62668310d6d529073dc7da7bbdd905fc5eb0ddffe03282704ef0b561c87490901d352a752677a8efc4bfc4a50029f4a07b24f0dbd1ab06311cfe
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
- A basic cash register
1
+ ###执行
2
+ bundle install
3
+ ###执行
4
+ bundle exec rspec spec
2
5
 
3
- 商店里进行购物结算时会使用收银机系统,这台收银机会在结算时根据客户的购物车中的商品和商店正在进行的优惠活动进行结算和打印购物小票。
6
+ ###需求
4
7
 
5
8
  已知商品信息包含:名称,数量单位,单价,类别和条形码(伪)。
6
9
  已知我们可以对收银机进行设置,使之支持各种优惠。
@@ -14,12 +14,11 @@ module CashRegister
14
14
  end
15
15
 
16
16
  def find_by_code(code = '')
17
- begin
18
- deal = @deals[code]
19
- rescue
20
- raise InvalidDealError if deal.nil?
21
- end
17
+ deal = @deals[code]
18
+ raise InvalidDealError if deal.nil?
19
+ deal
22
20
  end
23
21
  end
22
+ init_deals('')
24
23
  end
25
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cash_register
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
  - Clark King