Module: Ui::Actionable
- Included in:
- Card, DescriptiveList, Empty, List, Notification, PageHeader, Table
- Defined in:
- lib/ui/actionable.rb
Instance Method Summary collapse
Instance Method Details
#actions ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/ui/actionable.rb', line 3 def actions render_group( .fetch(:actions, Array.new).map do |action| action.call(model) end ) end |
#actions_length ⇒ Object
11 12 13 |
# File 'lib/ui/actionable.rb', line 11 def actions_length .fetch(:actions, Array.new).size end |
#has_actions? ⇒ Boolean
15 16 17 |
# File 'lib/ui/actionable.rb', line 15 def has_actions? .fetch(:actions, []).any? end |