Class: Decidim::CheckBoxesTreeHelper::TreePoint

Inherits:
Struct
  • Object
show all
Defined in:
decidim-core/app/helpers/decidim/check_boxes_tree_helper.rb

Overview

struct for leafs of checkboxes trees

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



47
48
49
# File 'decidim-core/app/helpers/decidim/check_boxes_tree_helper.rb', line 47

def label
  @label
end

#rootObject

Returns the value of attribute root

Returns:

  • (Object)

    the current value of root



47
48
49
# File 'decidim-core/app/helpers/decidim/check_boxes_tree_helper.rb', line 47

def root
  @root
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



47
48
49
# File 'decidim-core/app/helpers/decidim/check_boxes_tree_helper.rb', line 47

def value
  @value
end

Instance Method Details

#root?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'decidim-core/app/helpers/decidim/check_boxes_tree_helper.rb', line 52

def root?
  root.present? || value.blank?
end

#tree_node?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'decidim-core/app/helpers/decidim/check_boxes_tree_helper.rb', line 48

def tree_node?
  is_a?(TreeNode)
end