Module: Humanoid::Extensions::Array::Conversions
- Included in:
- Array
- Defined in:
- lib/humanoid/extensions/array/conversions.rb
Overview
This module converts arrays into humanoid related objects.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#humanoidize ⇒ Object
Converts this array into an array of hashes.
Class Method Details
.included(base) ⇒ Object
12 13 14 15 16 |
# File 'lib/humanoid/extensions/array/conversions.rb', line 12 def self.included(base) base.class_eval do extend ClassMethods end end |
Instance Method Details
#humanoidize ⇒ Object
Converts this array into an array of hashes.
8 9 10 |
# File 'lib/humanoid/extensions/array/conversions.rb', line 8 def humanoidize collect { |obj| obj.attributes } end |