Class: Sitepress::Data::Collection
- Inherits:
-
Object
- Object
- Sitepress::Data::Collection
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/sitepress/data.rb
Overview
Wraps an array and returns managed elements
Instance Method Summary collapse
-
#initialize(array) ⇒ Collection
constructor
A new instance of Collection.
- #unmanage ⇒ Object
Constructor Details
#initialize(array) ⇒ Collection
Returns a new instance of Collection.
30 31 32 |
# File 'lib/sitepress/data.rb', line 30 def initialize(array) @array = array.map { |element| Data.manage(element) } end |