Class: Houston::Extensions::ProjectColumn

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ability_blockObject

Returns the value of attribute ability_block.



282
283
284
# File 'lib/houston/boot/extensions.rb', line 282

def ability_block
  @ability_block
end

#html_blockObject

Returns the value of attribute html_block.



281
282
283
# File 'lib/houston/boot/extensions.rb', line 281

def html_block
  @html_block
end

#nameObject

Returns the value of attribute name.



284
285
286
# File 'lib/houston/boot/extensions.rb', line 284

def name
  @name
end

#slugObject

Returns the value of attribute slug.



283
284
285
# File 'lib/houston/boot/extensions.rb', line 283

def slug
  @slug
end

Instance Method Details

#permitted?(ability) ⇒ Boolean

Returns:

  • (Boolean)


290
291
292
293
# File 'lib/houston/boot/extensions.rb', line 290

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

#render(project) ⇒ Object



286
287
288
# File 'lib/houston/boot/extensions.rb', line 286

def render(project)
  html_block.call project
end