Class: Analytics::NavbarHelper::NavbarSubItem

Inherits:
Object
  • Object
show all
Defined in:
app/helpers/analytics/navbar_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title:, path:, link:, link_to_options: {}) ⇒ NavbarSubItem

Returns a new instance of NavbarSubItem.


8
9
10
11
12
13
# File 'app/helpers/analytics/navbar_helper.rb', line 8

def initialize(title:, path:, link:, link_to_options: {})
  @title = title
  @path = path
  @link = link
  @link_to_options = link_to_options.merge(title: title)
end

Instance Attribute Details

Returns the value of attribute link


6
7
8
# File 'app/helpers/analytics/navbar_helper.rb', line 6

def link
  @link
end

Returns the value of attribute link_to_options


6
7
8
# File 'app/helpers/analytics/navbar_helper.rb', line 6

def link_to_options
  @link_to_options
end

#pathObject (readonly)

Returns the value of attribute path


6
7
8
# File 'app/helpers/analytics/navbar_helper.rb', line 6

def path
  @path
end

#titleObject (readonly)

Returns the value of attribute title


6
7
8
# File 'app/helpers/analytics/navbar_helper.rb', line 6

def title
  @title
end