Class: Gitlab::Dangerfiles::Capability
- Inherits:
-
CapabilityStruct
- Object
- Struct
- CapabilityStruct
- Gitlab::Dangerfiles::Capability
- Defined in:
- lib/gitlab/dangerfiles/capability.rb
Defined Under Namespace
Classes: 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
23 24 25 |
# File 'lib/gitlab/dangerfiles/capability.rb', line 23 def has_capability?(teammate) teammate.capabilities(project).include?(capability) end |