json-serializer 0.0.3 → 0.0.4

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: 4d1ee255e70be3621c476154123e03ad6bec649d
4
- data.tar.gz: ea26a50a35097eec83e8a3a505d7d447436d5a49
3
+ metadata.gz: eb55cad4ed40f9a589122ffc2c1e7a5343348bef
4
+ data.tar.gz: 489f293b1a246166f1296a166f8aea41e6c226ae
5
5
  SHA512:
6
- metadata.gz: 73a0717218dad551abb4d73c4478ae27e2aa8c302d5a99d42867564452d96b69ddf86fec2d95be03964de9982bf15af931c4c4e23b11e8d32a6e3a7f9717a78b
7
- data.tar.gz: 1acb1d09c30670ee406fbc19f3ed94d1f72a72259d43f9f9c9ccd8006134b30397b5db2473da59521241a6f6c33d5523a053a4fab2805f4304b30d1b7ad9e0fe
6
+ metadata.gz: cf5f1e0dd56a62cc665d47c428958a559e0d08c396afaf60acef9729d29d1b448e8b8e3740aa6c42b9354d392023613bd5dff3928242f6d55fcf25bbea19d8b1
7
+ data.tar.gz: 331ec96e83f75aa365b640f233b6fb13896ede66a1d2dcfb255ea251627cfe489330e6330b3d663e26a70951d9202a293196272d29a962b7197567b92a5bf13e
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "json-serializer"
3
- s.version = "0.0.3"
3
+ s.version = "0.0.4"
4
4
  s.summary = "Customize JSON ouput through serializer objects."
5
5
  s.description = s.summary
6
6
  s.authors = ["Francesco Rodríguez"]
@@ -26,8 +26,8 @@ class JsonSerializer
26
26
  protected
27
27
 
28
28
  def serializable_object
29
- if object.respond_to?(:to_ary)
30
- object.to_ary.map { |item| self.class.new(item).attributes }
29
+ if object.kind_of?(Enumerable)
30
+ object.to_a.map { |item| self.class.new(item).attributes }
31
31
  else
32
32
  attributes
33
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-serializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Rodríguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-05 00:00:00.000000000 Z
11
+ date: 2014-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cutest