Class: Megar::Files

Inherits:
Object
  • Object
show all
Includes:
CatalogItem
Defined in:
lib/megar/catalog/files.rb

Overview

Collection manager for files

Instance Attribute Summary

Attributes included from CatalogItem

#id, #key, #name, #payload, #type

Instance Method Summary collapse

Methods included from CatalogItem

#==, #[], #attributes=, #collection, #each, #find_by_type, #reset!, #resource_class

Constructor Details

#initialize(options = {}) ⇒ Files

Returns a new instance of Files.



5
6
# File 'lib/megar/catalog/files.rb', line 5

def initialize(options={})
end

Instance Method Details

#add(attributes) ⇒ Object

Adds an item to the local cached collection given attributes hash.



9
10
11
# File 'lib/megar/catalog/files.rb', line 9

def add(attributes)
  collection << Megar::File.new(attributes)
end