Class: Gitlab::Dangerfiles::Capability
- Inherits:
-
CapabilityStruct
- Object
- Struct
- CapabilityStruct
- Gitlab::Dangerfiles::Capability
- Defined in:
- lib/gitlab/dangerfiles/capability.rb
Direct Known Subclasses
ImportIntegrateBE, ImportIntegrateFE, None, Test, Tooling, UX
Defined Under Namespace
Classes: ImportIntegrateBE, ImportIntegrateFE, None, Test, Tooling, UX
Instance Attribute Summary
Attributes inherited from CapabilityStruct
#category, #kind, #labels, #project
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.for(category, **arguments) ⇒ Object
8 9 10 11 |
# File 'lib/gitlab/dangerfiles/capability.rb', line 8 def self.for(category, **arguments) (category_to_class[category] || self) .new(category: category, **arguments) end |
Instance Method Details
#has_capability?(teammate) ⇒ Boolean
25 26 27 |
# File 'lib/gitlab/dangerfiles/capability.rb', line 25 def has_capability?(teammate) teammate.capabilities(project).include?(capability) end |