centurian 0.0.2 → 0.0.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: e11b6777f15404860edfe6d7d318b8026e96d57c
4
- data.tar.gz: 555f684d55aae3fcf4c94f415da4555f7ed17666
3
+ metadata.gz: 112cc48acfd522d1b9ace4060d88947ca2d7eca8
4
+ data.tar.gz: b4ace04e80d613f221041da4343def3f06113b99
5
5
  SHA512:
6
- metadata.gz: 8d0a69b384a3c109f5aa397520094dcb3198c24f3b1b5de405de72098ddbbf99bbc87ff86760eab0aedf69a1d8fe67f30cf42bc0049c3c4cc71a887b911dda8a
7
- data.tar.gz: d17be6019a672b0697abcca2582acc09bc17166599d0ba9fbbcc398a1e01bf6233bf8be001b9c8d98b1e7d7ebd6a9518d46612e991a187db82be55b9f30b89f3
6
+ metadata.gz: 502a80649c82b09c44670bb2caa66bfeeb56f8d7c70d31d3095b865a75c5b6f593895b5b17c1f3727c18bafbb8326b9946b1f8d71c76c52400e138ed1d8c719c
7
+ data.tar.gz: 9016cb6a92bbafab23210ee85ef80fa653bbb37e6a27e18403ea4d1ac02188218c393b64a71a9607c22a82092e07e23562ec6855f43d5a3e1c28bbbcaa469bce
data/Gemfile CHANGED
@@ -2,3 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in centurian.gemspec
4
4
  gemspec
5
+ gem 'pry'
@@ -1,11 +1,12 @@
1
1
  require "centurian/version"
2
2
 
3
3
  module Centurian
4
- ROMAN = {M: 1000, CM: 900, D: 500, CD: 400, C: 100, XC: 90, L: 50, XL: 40, X:10, IX: 9, V:5, IV: 4, I: 1}
4
+ ROMAN = {M: 1000, CM: 900, D: 500, CD: 400, C: 100, XC: 90, L: 50, XL: 40, X: 10, IX: 9, V: 5, IV: 4, I: 1}
5
5
 
6
6
  def to_roman
7
+ number = self
7
8
  ROMAN.reduce("") do |roman, (k, v)|
8
- count, number = (number || self).divmod(v)
9
+ count, number = number.divmod(v)
9
10
  roman << (k.to_s * count)
10
11
  end
11
12
  end
@@ -1,3 +1,3 @@
1
1
  module Centurian
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: centurian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Sloan