formatters 1.0.1 → 1.0.2

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
- SHA1:
3
- metadata.gz: d946ac34fe64f63ab235ffe7755c2fbb784e49b2
4
- data.tar.gz: 7553106d3c72f31ed48583c03b9f22f4e14dc1ae
2
+ SHA256:
3
+ metadata.gz: d08078c7dfbe5b1f2deb02eff89dc05a55fe1b1bafe9fe25c21f84ad19aab9fd
4
+ data.tar.gz: 9ada8ec16ab83a244a30a5b4c2d5266ec7c9b6817b7d65dc1fa3215674261552
5
5
  SHA512:
6
- metadata.gz: 1a780a4881b20839777cb99f16042ee791cec1850ef09cbb09a7e865b55c516fcd35d60dd61597bc717ae1324d45992ec1ba9a77332fb44ca90f704a758e6f1f
7
- data.tar.gz: 1a385762c6de0c4fe7ba8badbbace4dc0e44c0b83e31de3266d3b729655b853bfdc106f6bddc3a9f4a6ed72e27cb52c1025f4d38a9f5e85dc27857f9fb80b5b0
6
+ metadata.gz: cee013751d15c7c59d65df75293d315cef5df76b76fc383def8f56e3e4dcbd96e222eb087c304a503c54ecb04e43a166f1fd2d9c6c883743fecc2ad119814774
7
+ data.tar.gz: 1d1d11e87a55104df010f31d3276a8d815a48b7f693b3f44197bb20a4e548c200d5dfad8e5133c23978f7c509b4755d858d41959d28b3b513c941b06f09c8dfb
@@ -27,7 +27,11 @@ module Formatters
27
27
  end
28
28
 
29
29
  def self.format_as object, format
30
- @@formats[format].call(object)
30
+ if @@formats[format]
31
+ @@formats[format].call(object)
32
+ else
33
+ object
34
+ end
31
35
  end
32
36
  end
33
37
 
@@ -1,3 +1,3 @@
1
1
  module Formatters
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formatters
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Rowell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-08 00:00:00.000000000 Z
11
+ date: 2019-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  requirements: []
80
80
  rubyforge_project:
81
- rubygems_version: 2.5.1
81
+ rubygems_version: 2.7.9
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Friendly data formatting for your Rails views.