Class: JekyllNavigation::AbstractNavigationItem
- Inherits:
-
Struct
- Object
- Struct
- JekyllNavigation::AbstractNavigationItem
show all
- Defined in:
- lib/jekyll-navigation/navigation_item.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#page ⇒ Object
Returns the value of attribute page
2
3
4
|
# File 'lib/jekyll-navigation/navigation_item.rb', line 2
def page
@page
end
|
Instance Method Details
#[](key) ⇒ Object
3
4
5
|
# File 'lib/jekyll-navigation/navigation_item.rb', line 3
def [] key
page[key]
end
|
#exclude? ⇒ Boolean
21
22
23
|
# File 'lib/jekyll-navigation/navigation_item.rb', line 21
def exclude?
fetch_navigation_property('exclude') { false }
end
|
#order ⇒ Object
17
18
19
|
# File 'lib/jekyll-navigation/navigation_item.rb', line 17
def order
fetch_navigation_property('order') { -1 }
end
|
#parent ⇒ Object
13
14
15
|
# File 'lib/jekyll-navigation/navigation_item.rb', line 13
def parent
fetch_navigation_property('parent') { nil }
end
|
#title ⇒ Object
7
8
9
10
11
|
# File 'lib/jekyll-navigation/navigation_item.rb', line 7
def title
fetch_navigation_property('title') do
self["title"] || File.basename(self["name"], File.extname(self["name"]))
end
end
|