Class: Gitlab::Dangerfiles::Approval
- Inherits:
-
Struct
- Object
- Struct
- Gitlab::Dangerfiles::Approval
- Defined in:
- lib/gitlab/dangerfiles/approval.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#spin ⇒ Object
Returns the value of attribute spin.
Class Method Summary collapse
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category
7 8 9 |
# File 'lib/gitlab/dangerfiles/approval.rb', line 7 def category @category end |
#spin ⇒ Object
Returns the value of attribute spin
7 8 9 |
# File 'lib/gitlab/dangerfiles/approval.rb', line 7 def spin @spin end |
Class Method Details
.from_approval_rule(rule, maintainer) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/gitlab/dangerfiles/approval.rb', line 8 def self.from_approval_rule(rule, maintainer) category = if rule["section"] == "codeowners" "`#{rule['name']}`" else rule["section"] end.to_sym spin = Spin.new(category, nil, maintainer, :reviewer) new(category, spin) end |