Class: RHC::Rest::Team
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?
#define_attr, #model_name
Methods included from Attributes
#attribute, #attributes, #attributes=, #clear_attribute
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_role ⇒ Object
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
9
10
11
|
# File 'lib/rhc/rest/team.rb', line 9
def global?
global
end
|
17
18
19
|
# File 'lib/rhc/rest/team.rb', line 17
def to_s
self.name
end
|