Class: LabClient::PushRule
- Includes:
- ClassHelpers
- Defined in:
- lib/labclient/projects/push_rules/push_rule.rb
Overview
Inspect Helper
Instance Attribute Summary
Attributes inherited from Klass
Attributes inherited from LabStruct
Instance Method Summary collapse
Methods included from ClassHelpers
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
Methods inherited from LabStruct
#as_json, #client, #keys, #slice, #success?
Constructor Details
This class inherits a constructor from LabClient::Klass
Instance Method Details
#delete ⇒ Object
18 19 20 |
# File 'lib/labclient/projects/push_rules/push_rule.rb', line 18 def delete client.projects.push_rules.delete(project_id) end |
#inspect ⇒ Object
6 7 8 |
# File 'lib/labclient/projects/push_rules/push_rule.rb', line 6 def inspect "#<PushRule id: #{id}>" end |
#project ⇒ Object
10 11 12 |
# File 'lib/labclient/projects/push_rules/push_rule.rb', line 10 def project client.projects.show project_id end |
#update(query) ⇒ Object
14 15 16 |
# File 'lib/labclient/projects/push_rules/push_rule.rb', line 14 def update(query) update_self client.projects.push_rules.update(project_id, query) end |