Class: Component::Buttongroup::Cell

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

Constant Summary collapse

@@styles =
VIEW_COMPONENTSTYLES
@@sizes =
%w(

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Cell.



10
11
12
13
14
15
16
17
# File 'app/cells/lato_view/component/buttongroup/cell.rb', line 10

def initialize(links: [], size: '', style: 'normal')
  # save params
  @links = links
  @size = size
  @style = style
  # check params
  check_params
end

Instance Attribute Details

NB: links must be an array of hash ‘name’, url: ‘url’



8
9
10
# File 'app/cells/lato_view/component/buttongroup/cell.rb', line 8

def links
  @links
end

#sizeObject

NB: links must be an array of hash ‘name’, url: ‘url’



8
9
10
# File 'app/cells/lato_view/component/buttongroup/cell.rb', line 8

def size
  @size
end

#styleObject

NB: links must be an array of hash ‘name’, url: ‘url’



8
9
10
# File 'app/cells/lato_view/component/buttongroup/cell.rb', line 8

def style
  @style
end

Instance Method Details

#showObject



19
20
21
# File 'app/cells/lato_view/component/buttongroup/cell.rb', line 19

def show
  render 'show.html'
end