attribute_serializer 0.1.0 → 0.2.0

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/attribute_serializer.rb +2 -2
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -39,8 +39,8 @@ module AttributeSerializer
39
39
  end
40
40
 
41
41
  def generate(context_name, object)
42
- if object.is_a?(Array)
43
- object.map { |o| generate_single(o.class, context_name, o) }
42
+ if object.respond_to? :collect
43
+ object.collect { |o| generate_single(o.class, context_name, o) }
44
44
  else
45
45
  generate_single(object.class, context_name, object)
46
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attribute_serializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Myles Byrne