Class: Alchemy::Admin::Resource::Action
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Alchemy::Admin::Resource::Action
- Defined in:
- app/components/alchemy/admin/resource/action.rb
Overview
Renders a container for a button, which evaluate CanCanCan and shows a tooltip. This is an internal component for the resource table, to make easier to read.
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tooltip ⇒ Object
readonly
Returns the value of attribute tooltip.
Instance Method Summary collapse
-
#initialize(name = nil, tooltip = nil, resource = nil, &block) ⇒ Action
constructor
A new instance of Action.
Constructor Details
#initialize(name = nil, tooltip = nil, resource = nil, &block) ⇒ Action
Returns a new instance of Action.
35 36 37 38 39 40 |
# File 'app/components/alchemy/admin/resource/action.rb', line 35 def initialize(name = nil, tooltip = nil, resource = nil, &block) @name = name @tooltip = tooltip @resource = resource @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
21 22 23 |
# File 'app/components/alchemy/admin/resource/action.rb', line 21 def block @block end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
21 22 23 |
# File 'app/components/alchemy/admin/resource/action.rb', line 21 def name @name end |
#tooltip ⇒ Object (readonly)
Returns the value of attribute tooltip.
21 22 23 |
# File 'app/components/alchemy/admin/resource/action.rb', line 21 def tooltip @tooltip end |