Class: Blingee::Collection
- Inherits:
-
Array
- Object
- Array
- Blingee::Collection
- Defined in:
- lib/blingee/collection.rb
Overview
Simple collection, generally holding several instances of Blingee::Entry.
Class Method Summary collapse
Class Method Details
.from_hash(blingee_hash_array) ⇒ Object
8 9 10 11 |
# File 'lib/blingee/collection.rb', line 8 def self.from_hash(blingee_hash_array) blingee_hash_array = [blingee_hash_array].compact unless blingee_hash_array.kind_of?(Array) new(blingee_hash_array.collect { |attributes| Blingee::Entry.new(attributes) }) end |