Class: Component::Dropdown::Cell

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

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_textObject

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

#titleObject

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

#showObject



16
17
18
# File 'app/cells/lato_view/component/dropdown/cell.rb', line 16

def show
  render 'show.html'
end