Class: LabClient::ApprovalRule
Overview
Instance Attribute Summary
Attributes inherited from Klass
#client, #response
Instance Method Summary
collapse
#has?, #keys, #raw
Methods inherited from Klass
#collect_project_id, #collect_release_id, #collect_repository_id, date_time_attrs, #format_time?, #group_name, #help, #initialize, #klass, #to_json, #update_self, user_attrs, #valid_group_project_levels, #verbose
Methods included from Docs
#desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title
Methods included from CurlHelper
#curl
Methods inherited from OpenStruct
#as_json, #keys
Instance Method Details
#eligible_approvers ⇒ Object
12
13
14
15
16
|
# File 'lib/labclient/approvals/rule.rb', line 12
def eligible_approvers
@table[:eligible_approvers].map do |user_data|
User.new(user_data, response, client)
end
end
|
#groups ⇒ Object
30
31
32
33
34
|
# File 'lib/labclient/approvals/rule.rb', line 30
def groups
@table[:groups].map do |group_data|
Group.new(group_data, response, client)
end
end
|
#inspect ⇒ Object
8
9
10
|
# File 'lib/labclient/approvals/rule.rb', line 8
def inspect
"#<ApprovalRule id: #{id}, name: #{name}>"
end
|
#protected_branches ⇒ Object
18
19
20
21
22
|
# File 'lib/labclient/approvals/rule.rb', line 18
def protected_branches
@table[:protected_branches].map do |branch_data|
LabClient::Branch.new(branch_data, response, client)
end
end
|
#users ⇒ Object
24
25
26
27
28
|
# File 'lib/labclient/approvals/rule.rb', line 24
def users
@table[:users].map do |user_data|
User.new(user_data, response, client)
end
end
|