Class: Houston::Extensions::ProjectFeature
- Inherits:
-
GlobalFeature
- Object
- GlobalFeature
- Houston::Extensions::ProjectFeature
- Defined in:
- lib/houston/boot/extensions.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
Attributes inherited from GlobalFeature
#ability_block, #icon, #name, #path_block, #slug
Instance Method Summary collapse
-
#initialize ⇒ ProjectFeature
constructor
A new instance of ProjectFeature.
- #permitted?(ability, project) ⇒ Boolean
- #project_path(project) ⇒ Object (also: #path)
Constructor Details
#initialize ⇒ ProjectFeature
Returns a new instance of ProjectFeature.
181 182 183 |
# File 'lib/houston/boot/extensions.rb', line 181 def initialize self.fields = [] end |
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields.
179 180 181 |
# File 'lib/houston/boot/extensions.rb', line 179 def fields @fields end |
Instance Method Details
#permitted?(ability, project) ⇒ Boolean
190 191 192 193 |
# File 'lib/houston/boot/extensions.rb', line 190 def permitted?(ability, project) return true if ability_block.nil? ability_block.call ability, project end |
#project_path(project) ⇒ Object Also known as: path
185 186 187 |
# File 'lib/houston/boot/extensions.rb', line 185 def project_path(project) path_block.call project end |