Class: Muddyit::Collections::Collection

Inherits:
Generic show all
Defined in:
lib/muddyit/collections/collection.rb

Defined Under Namespace

Classes: Entities, Pages

Instance Attribute Summary

Attributes inherited from Generic

#attributes

Attributes inherited from Base

#access_token, #access_token_secret, #auth_type, #consumer_key, #consumer_secret, #password, #rest_endpoint, #username

Instance Method Summary collapse

Methods inherited from Generic

#initialize, #method_missing

Methods inherited from Base

#collections, #extract, #initialize, #send_request

Constructor Details

This class inherits a constructor from Muddyit::Generic

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Muddyit::Generic

Instance Method Details

#destroyObject



8
9
10
11
# File 'lib/muddyit/collections/collection.rb', line 8

def destroy
  api_url = "/collections/#{@attributes[:token]}"
  @muddyit.send_request(api_url, :delete, {})
end

#entitiesObject



6
# File 'lib/muddyit/collections/collection.rb', line 6

def entities() @entities ||= Muddyit::Collections::Collection::Entities.new(@muddyit, :collection => self) end

#pagesObject

get pages object for collection



5
# File 'lib/muddyit/collections/collection.rb', line 5

def pages() @pages ||= Muddyit::Collections::Collection::Pages.new(@muddyit, :collection => self) end