Module: Sidebars::Concerns::ContainerWithHtmlOptions

Includes:
LinkWithHtmlOptions
Included in:
Menu
Defined in:
lib/sidebars/concerns/container_with_html_options.rb

Instance Method Summary collapse

Methods included from LinkWithHtmlOptions

#link_html_options

Instance Method Details

#container_html_optionsObject

The attributes returned from this method will be applied to helper methods like ‘link_to` or the div containing the container.



11
12
13
14
15
# File 'lib/sidebars/concerns/container_with_html_options.rb', line 11

def container_html_options
  {
    aria: { label: title }
  }.merge(extra_container_html_options)
end

#extra_container_html_optionsObject

Classes will override mostly this method and not ‘container_html_options`.



19
20
21
# File 'lib/sidebars/concerns/container_with_html_options.rb', line 19

def extra_container_html_options
  {}
end

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/sidebars/concerns/container_with_html_options.rb', line 27

def link
  raise NotImplementedError
end

#titleObject

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/sidebars/concerns/container_with_html_options.rb', line 23

def title
  raise NotImplementedError
end