Module: Sinicum::Navigation::NavigationElement
- Extended by:
- ActiveSupport::Concern
- Included in:
- DefaultNavigationElement
- Defined in:
- lib/sinicum/navigation/navigation_element.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#depth ⇒ Object
readonly
Returns the value of attribute depth.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#uuid ⇒ Object
readonly
Returns the value of attribute uuid.
Instance Method Summary collapse
- #children? ⇒ Boolean
- #has_children? ⇒ Boolean
- #initialize(uuid, path, depth, properties, children) ⇒ Object
- #title ⇒ Object
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
6 7 8 |
# File 'lib/sinicum/navigation/navigation_element.rb', line 6 def children @children end |
#depth ⇒ Object (readonly)
Returns the value of attribute depth.
6 7 8 |
# File 'lib/sinicum/navigation/navigation_element.rb', line 6 def depth @depth end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/sinicum/navigation/navigation_element.rb', line 6 def path @path end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
6 7 8 |
# File 'lib/sinicum/navigation/navigation_element.rb', line 6 def properties @properties end |
#uuid ⇒ Object (readonly)
Returns the value of attribute uuid.
6 7 8 |
# File 'lib/sinicum/navigation/navigation_element.rb', line 6 def uuid @uuid end |
Instance Method Details
#children? ⇒ Boolean
24 25 26 |
# File 'lib/sinicum/navigation/navigation_element.rb', line 24 def children? @children && @children.size > 0 end |
#has_children? ⇒ Boolean
19 20 21 22 |
# File 'lib/sinicum/navigation/navigation_element.rb', line 19 def has_children? warn "[DEPRECATION] `has_children?` is deprecated. Please use `children?` instead." @children && @children.size > 0 end |
#initialize(uuid, path, depth, properties, children) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/sinicum/navigation/navigation_element.rb', line 8 def initialize(uuid, path, depth, properties, children) @uuid = uuid @path = path @depth = depth @properties = properties @children = children end |
#title ⇒ Object
16 17 |
# File 'lib/sinicum/navigation/navigation_element.rb', line 16 def title end |