Class: Lookbook::PageSectionEntity Private
- Inherits:
-
PageEntity
- Object
- Entity
- PageEntity
- Lookbook::PageSectionEntity
- Defined in:
- lib/lookbook/entities/page_section_entity.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents a documentation page section.
Instance Attribute Summary collapse
- #parent ⇒ Object (also: #page) private
Attributes inherited from PageEntity
Instance Method Summary collapse
-
#initialize(file_path) ⇒ PageSectionEntity
constructor
private
A new instance of PageSectionEntity.
- #landing? ⇒ Boolean private
- #lookup_path ⇒ Object private
- #name ⇒ Object private
- #url_path ⇒ Object private
Methods inherited from PageEntity
#add_section, #data, #docs_path, #footer?, #header?, #markdown?, #method_missing, #respond_to_missing?, #search_terms, #title
Methods inherited from Entity
#<=>, #id, #label, #search_terms, #type
Constructor Details
#initialize(file_path) ⇒ PageSectionEntity
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PageSectionEntity.
9 10 11 12 13 |
# File 'lib/lookbook/entities/page_section_entity.rb', line 9 def initialize(file_path) @file_path = Pathname(file_path) @parent = nil super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Lookbook::PageEntity
Instance Attribute Details
#parent ⇒ Object Also known as: page
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 |
# File 'lib/lookbook/entities/page_section_entity.rb', line 7 def parent @parent end |
Instance Method Details
#landing? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 |
# File 'lib/lookbook/entities/page_section_entity.rb', line 28 def landing? false end |
#lookup_path ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 22 23 24 25 26 |
# File 'lib/lookbook/entities/page_section_entity.rb', line 19 def lookup_path directory = if relative_directory_path.present? && !relative_directory_path.to_s.start_with?(".") relative_directory_path end path = PathUtils.to_path(directory, name_parts[:parent_name]) PathUtils.to_lookup_path(path) end |
#name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 |
# File 'lib/lookbook/entities/page_section_entity.rb', line 15 def name Utils.name(name_parts[:name]) end |
#url_path ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/lookbook/entities/page_section_entity.rb', line 32 def url_path nil end |