Module: Broadway::Hierarchical::InstanceMethods
- Defined in:
- lib/broadway/mixins/hierarchical.rb
Instance Attribute Summary collapse
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#children ⇒ Object
Returns the value of attribute children.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#show_children ⇒ Object
Returns the value of attribute show_children.
Instance Method Summary collapse
Instance Attribute Details
#categories ⇒ Object
Returns the value of attribute categories.
8 9 10 |
# File 'lib/broadway/mixins/hierarchical.rb', line 8 def categories @categories end |
#children ⇒ Object
Returns the value of attribute children.
8 9 10 |
# File 'lib/broadway/mixins/hierarchical.rb', line 8 def children @children end |
#parent ⇒ Object
Returns the value of attribute parent.
8 9 10 |
# File 'lib/broadway/mixins/hierarchical.rb', line 8 def parent @parent end |
#show_children ⇒ Object
Returns the value of attribute show_children.
8 9 10 |
# File 'lib/broadway/mixins/hierarchical.rb', line 8 def show_children @show_children end |
Instance Method Details
#num_children ⇒ Object
44 45 46 |
# File 'lib/broadway/mixins/hierarchical.rb', line 44 def num_children children.length end |
#show_children? ⇒ Boolean
39 40 41 42 |
# File 'lib/broadway/mixins/hierarchical.rb', line 39 def show_children? return true if self.data.blank? return self.show_children == true end |