Class: Component::Dropdown::Cell
- Inherits:
-
Cell
- Object
- Cell
- Component::Dropdown::Cell
- Defined in:
- app/cells/lato_view/component/dropdown/cell.rb
Instance Attribute Summary collapse
-
#links ⇒ Object
NB: links must be an array of hash ‘name’, url: ‘url’.
-
#open_text ⇒ Object
NB: links must be an array of hash ‘name’, url: ‘url’.
-
#title ⇒ Object
NB: links must be an array of hash ‘name’, url: ‘url’.
Instance Method Summary collapse
-
#initialize(links: [], title: '', open_text: nil) ⇒ Cell
constructor
A new instance of Cell.
- #show ⇒ Object
Constructor Details
#initialize(links: [], title: '', open_text: nil) ⇒ Cell
Returns a new instance of Cell.
7 8 9 10 11 12 13 14 |
# File 'app/cells/lato_view/component/dropdown/cell.rb', line 7 def initialize(links: [], title: '', open_text: nil) # save params @links = links @title = title @open_text = open_text # check params check_params end |
Instance Attribute Details
#links ⇒ Object
NB: links must be an array of hash ‘name’, url: ‘url’
5 6 7 |
# File 'app/cells/lato_view/component/dropdown/cell.rb', line 5 def links @links end |
#open_text ⇒ Object
NB: links must be an array of hash ‘name’, url: ‘url’
5 6 7 |
# File 'app/cells/lato_view/component/dropdown/cell.rb', line 5 def open_text @open_text end |
#title ⇒ Object
NB: links must be an array of hash ‘name’, url: ‘url’
5 6 7 |
# File 'app/cells/lato_view/component/dropdown/cell.rb', line 5 def title @title end |
Instance Method Details
#show ⇒ Object
16 17 18 |
# File 'app/cells/lato_view/component/dropdown/cell.rb', line 16 def show render 'show.html' end |