Class: Houston::Extensions::GlobalFeature

Inherits:
Object
  • Object
show all
Defined in:
lib/houston/boot/extensions.rb

Direct Known Subclasses

ProjectFeature

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ability_blockObject

Returns the value of attribute ability_block.



166
167
168
# File 'lib/houston/boot/extensions.rb', line 166

def ability_block
  @ability_block
end

#iconObject

Returns the value of attribute icon.



166
167
168
# File 'lib/houston/boot/extensions.rb', line 166

def icon
  @icon
end

#nameObject

Returns the value of attribute name.



166
167
168
# File 'lib/houston/boot/extensions.rb', line 166

def name
  @name
end

#path_blockObject

Returns the value of attribute path_block.



166
167
168
# File 'lib/houston/boot/extensions.rb', line 166

def path_block
  @path_block
end

#slugObject

Returns the value of attribute slug.



166
167
168
# File 'lib/houston/boot/extensions.rb', line 166

def slug
  @slug
end

Instance Method Details

#pathObject



168
169
170
# File 'lib/houston/boot/extensions.rb', line 168

def path
  path_block.call
end

#permitted?(ability) ⇒ Boolean

Returns:

  • (Boolean)


172
173
174
175
# File 'lib/houston/boot/extensions.rb', line 172

def permitted?(ability)
  return true if ability_block.nil?
  ability_block.call ability
end