Class: Teambox::Organization

Inherits:
Resource show all
Defined in:
lib/teambox-client/models/organization.rb

Instance Attribute Summary

Attributes inherited from Resource

#data, #list, #references

Instance Method Summary collapse

Methods inherited from Resource

#created_at, #destroy, #id, #initialize, #inspect, #method_missing, #next, #prev, #reload, #save, #updated_at

Methods included from ReferenceList

#generate_references, #get_or_make_reference, #get_or_make_references, #get_reference, #set_reference

Constructor Details

This class inherits a constructor from Teambox::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Teambox::Resource

Instance Method Details

#membershipsObject

Gets a Teambox::ResultSet of all Teambox::Membership objects belonging to the organization



10
11
12
# File 'lib/teambox-client/models/organization.rb', line 10

def memberships
  @list.client.get("#{url}/memberships")
end

#projectsObject

Gets a Teambox::ResultSet of all Teambox::Project objects belonging to the organization



5
6
7
# File 'lib/teambox-client/models/organization.rb', line 5

def projects
  @list.client.get("#{url}/projects")
end

#urlObject

:nodoc:



14
15
16
# File 'lib/teambox-client/models/organization.rb', line 14

def url #:nodoc:
  "/organizations/#{@data['permalink']||@data['id']}"
end