Class: Houston::ProjectFeature
- Inherits:
-
Object
- Object
- Houston::ProjectFeature
- Defined in:
- lib/configuration.rb
Instance Attribute Summary collapse
-
#ability_block ⇒ Object
Returns the value of attribute ability_block.
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path_block ⇒ Object
Returns the value of attribute path_block.
-
#slug ⇒ Object
Returns the value of attribute slug.
Instance Method Summary collapse
-
#initialize ⇒ ProjectFeature
constructor
A new instance of ProjectFeature.
- #permitted?(ability, project) ⇒ Boolean
- #project_path(project) ⇒ Object
Constructor Details
#initialize ⇒ ProjectFeature
Returns a new instance of ProjectFeature.
526 527 528 |
# File 'lib/configuration.rb', line 526 def initialize self.fields = [] end |
Instance Attribute Details
#ability_block ⇒ Object
Returns the value of attribute ability_block.
524 525 526 |
# File 'lib/configuration.rb', line 524 def ability_block @ability_block end |
#fields ⇒ Object
Returns the value of attribute fields.
524 525 526 |
# File 'lib/configuration.rb', line 524 def fields @fields end |
#icon ⇒ Object
Returns the value of attribute icon.
524 525 526 |
# File 'lib/configuration.rb', line 524 def icon @icon end |
#name ⇒ Object
Returns the value of attribute name.
524 525 526 |
# File 'lib/configuration.rb', line 524 def name @name end |
#path_block ⇒ Object
Returns the value of attribute path_block.
524 525 526 |
# File 'lib/configuration.rb', line 524 def path_block @path_block end |
#slug ⇒ Object
Returns the value of attribute slug.
524 525 526 |
# File 'lib/configuration.rb', line 524 def slug @slug end |
Instance Method Details
#permitted?(ability, project) ⇒ Boolean
534 535 536 537 |
# File 'lib/configuration.rb', line 534 def permitted?(ability, project) return true if ability_block.nil? ability_block.call ability, project end |
#project_path(project) ⇒ Object
530 531 532 |
# File 'lib/configuration.rb', line 530 def project_path(project) path_block.call project end |