Class: CellsV1::Buttongroup::Cell

Inherits:
Cell
  • Object
show all
Defined in:
app/cells/lato_view/cells_v1/buttongroup/cell.rb

Overview

Cella Buttongroup

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(links: nil, size: nil, style: 'normal') ⇒ Cell

Returns a new instance of Cell.



20
21
22
23
24
25
# File 'app/cells/lato_view/cells_v1/buttongroup/cell.rb', line 20

def initialize(links: nil, size: nil, style: 'normal')
  # assegno i valori alle variabili di istanza
  @links = links if links && check_links(links)
  @size = size
  @style = style
end

Instance Attribute Details

Lista di links da mostrare nella Actionbar secondo la struttura [[‘Nome link’, ‘url’], [‘Nome link’, ‘url’]]

  • default: nil



10
11
12
# File 'app/cells/lato_view/cells_v1/buttongroup/cell.rb', line 10

def links
  @links
end

#sizeObject

Dimensione dei pulsanti della button

  • default: nil



14
15
16
# File 'app/cells/lato_view/cells_v1/buttongroup/cell.rb', line 14

def size
  @size
end

#styleObject

Stile da utilizzare per la buttongroup

  • default: nil (normal)



18
19
20
# File 'app/cells/lato_view/cells_v1/buttongroup/cell.rb', line 18

def style
  @style
end

Instance Method Details

#showObject



27
28
29
# File 'app/cells/lato_view/cells_v1/buttongroup/cell.rb', line 27

def show
  render 'show.html'
end