Module: Visor::Common::Extensions::Array
- Defined in:
- lib/common/extensions/array.rb
Overview
Extending Array class
Instance Method Summary collapse
-
#to_openstruct ⇒ Array
Convert each array element to an OpenStruct.
Instance Method Details
#to_openstruct ⇒ Array
Convert each array element to an OpenStruct. Used for Hash.to_openstruct
18 19 20 |
# File 'lib/common/extensions/array.rb', line 18 def to_openstruct map { |el| el.to_openstruct } end |