Class: LatoView::Buttongroup::Cell
- Defined in:
- app/concepts/lato_view/buttongroup/cell.rb
Overview
Cella Buttongroup
Constant Summary collapse
- @@styles =
Lista stili possibili per il bottongroup
VIEW_CELLSSTYLES
Instance Attribute Summary collapse
-
#links ⇒ Object
Lista di links da mostrare nella Actionbar secondo la struttura [[‘Nome link’, ‘url’], [‘Nome link’, ‘url’]] * default: nil.
-
#size ⇒ Object
Dimensione dei pulsanti della button * default: nil.
-
#style ⇒ Object
Stile da utilizzare per la buttongroup * default: nil (normal).
Instance Method Summary collapse
-
#initialize(links: nil, size: nil, style: 'normal') ⇒ Cell
constructor
A new instance of Cell.
- #show ⇒ Object
Constructor Details
#initialize(links: nil, size: nil, style: 'normal') ⇒ Cell
Returns a new instance of Cell.
22 23 24 25 26 27 28 29 |
# File 'app/concepts/lato_view/buttongroup/cell.rb', line 22 def initialize(links: nil, size: nil, style: 'normal') # eseguo brevi controlli sull'input raise 'Bottongroup Concept: style value in not correct' unless @@styles.include? style.to_s # assegno i valori alle variabili di istanza @links = links if links && check_links(links) @size = size @style = style end |
Instance Attribute Details
#links ⇒ Object
Lista di links da mostrare nella Actionbar secondo la struttura [[‘Nome link’, ‘url’], [‘Nome link’, ‘url’]]
-
default: nil
12 13 14 |
# File 'app/concepts/lato_view/buttongroup/cell.rb', line 12 def links @links end |
#size ⇒ Object
Dimensione dei pulsanti della button
-
default: nil
16 17 18 |
# File 'app/concepts/lato_view/buttongroup/cell.rb', line 16 def size @size end |
#style ⇒ Object
Stile da utilizzare per la buttongroup
-
default: nil (normal)
20 21 22 |
# File 'app/concepts/lato_view/buttongroup/cell.rb', line 20 def style @style end |
Instance Method Details
#show ⇒ Object
31 32 33 |
# File 'app/concepts/lato_view/buttongroup/cell.rb', line 31 def show render 'show.html' end |