Class: LabClient::GroupHook

Inherits:
Klass show all
Includes:
ClassHelpers
Defined in:
lib/labclient/groups/hooks/group_hook.rb

Overview

Inspect Helper

Instance Attribute Summary

Attributes inherited from Klass

#client, #response

Attributes inherited from LabStruct

#response

Instance Method Summary collapse

Methods included from ClassHelpers

#has?, #keys, #raw

Methods inherited from Klass

#api_methods, #collect_project_id, #collect_release_id, #collect_repository_id, date_time_attrs, #format_time?, #group_name, #help, #initialize, #klass, #success?, #to_json, #update_self, user_attrs, #valid_group_project_levels, #verbose

Methods included from Docs

#demo, #desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title

Methods included from CurlHelper

#curl

Methods inherited from LabStruct

#as_json, #client, #keys, #slice, #success?

Constructor Details

This class inherits a constructor from LabClient::Klass

Instance Method Details

#deleteObject



21
22
23
24
25
# File 'lib/labclient/groups/hooks/group_hook.rb', line 21

def delete
  group_id = collect_group_id

  client.groups.hooks.delete(group_id, id)
end

#groupObject



10
11
12
13
# File 'lib/labclient/groups/hooks/group_hook.rb', line 10

def group
  group_id = collect_group_id
  client.groups.show group_id
end

#inspectObject



6
7
8
# File 'lib/labclient/groups/hooks/group_hook.rb', line 6

def inspect
  "#<GroupHook id: #{id}, url: #{url}>"
end

#update(query) ⇒ Object



15
16
17
18
19
# File 'lib/labclient/groups/hooks/group_hook.rb', line 15

def update(query)
  group_id = collect_group_id

  update_self client.groups.hooks.update(group_id, id, query)
end