Class: RHC::Rest::Team

Inherits:
Base show all
Includes:
Membership
Defined in:
lib/rhc/rest/team.rb

Direct Known Subclasses

Mock::MockRestTeam

Instance Method Summary collapse

Methods included from Membership

#compact_members, #delete_members, included, #leave, #members, #owner, #supports_members?, #supports_update_members?, #update_members

Methods inherited from Base

#add_message, #has_param?, #initialize, #link_href, #links, #rest_method, #supports?

Methods included from AttributesClass

#define_attr, #model_name

Methods included from Attributes

#attribute, #attributes, #attributes=, #clear_attribute

Constructor Details

This class inherits a constructor from RHC::Rest::Base

Instance Method Details

#<=>(team) ⇒ Object



13
14
15
# File 'lib/rhc/rest/team.rb', line 13

def <=>(team)
  return self.name <=> team.name
end

#default_member_roleObject



28
29
30
# File 'lib/rhc/rest/team.rb', line 28

def default_member_role
  'view'
end

#destroy(force = false) ⇒ Object Also known as: delete



21
22
23
24
25
# File 'lib/rhc/rest/team.rb', line 21

def destroy(force=false)
  debug "Deleting team #{name} (#{id})"
  raise RHC::OperationNotSupportedException.new("The server does not support deleting this resource.") unless supports? 'DELETE'
  rest_method "DELETE"
end

#global?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/rhc/rest/team.rb', line 9

def global?
  global
end

#to_sObject



17
18
19
# File 'lib/rhc/rest/team.rb', line 17

def to_s
  self.name
end