dogfood 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f3da6c7dfbeb9f09325d741ae81a835d65da453a17f5ca6deeb3cfde8826f73
4
- data.tar.gz: 258a2ad0661d1aa5234e18305f75a39a0a696f8108fdef39988299db8e07d709
3
+ metadata.gz: 5cde3376fed8c151d5b1af379d618b5bf00d4d4f9e30bc01b4baacddaad08756
4
+ data.tar.gz: 2c946de9352ba90e8130e41afb53b6941f4b047dce39bbcacb8d5a2ea5bec5d9
5
5
  SHA512:
6
- metadata.gz: a6f7f694fbad5f13ff0d058eb819b005bc0cbd3464a3a692d022273759ec5f55bdc38e2206d99d2221fd458db732f948929d47949feccb44ddf2a210191fa624
7
- data.tar.gz: 5a23dcbaf64043a23160180459ec1cf73fb39ac83adb630bd010affb36e42303c6f1edc7609c5193e7a30e31583ae8bd6fab845b4ed323385a9c31195de72d69
6
+ metadata.gz: e7657d589fd684e7ad4b03d380995c13622098f72e0e897ca3d7a7d21ec17e27ef39301f2a91a8e7de0d88194a7de1ef6f7e38cdefb4e8fc7a79f91d3862e4f1
7
+ data.tar.gz: 78c5e27b6f1a6c290445d32867c85eb34e1f907530612acb56dadf5b8bf859458e806c2ca1d824d48cb93e3eb60ea246bfd4962ba558adb9385a647d0fc50d52
@@ -29,6 +29,12 @@ module Dogfood
29
29
  raise NotImplementedError
30
30
  end
31
31
 
32
+ def money(cents)
33
+ return "$0" if cents.nil? || cents == 0
34
+ dollars = (cents / 100.0).round
35
+ "$#{dollars.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse}"
36
+ end
37
+
32
38
  protected
33
39
 
34
40
  def step(actor:, event:, action:, notes: nil)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dogfood
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dogfood
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben D'Angelo