Class: JquerySortableTreeHelper::RenderExpandableTreeHelper::Render

Inherits:
JquerySortableTreeHelper::RenderSortableTreeHelper::Render show all
Defined in:
app/helpers/jquery_sortable_tree_helper/render_expandable_tree_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from JquerySortableTreeHelper::RenderSortableTreeHelper::Render

#children, #controls, #edit_link, #handle, #render_node, #show_link, #show_path

Constructor Details

#initialize(h, options) ⇒ Render

Returns a new instance of Render.



14
15
16
# File 'app/helpers/jquery_sortable_tree_helper/render_expandable_tree_helper.rb', line 14

def initialize(h, options)
  @h, @options = h, options
end

Instance Attribute Details

#hObject

Returns the value of attribute h.



12
13
14
# File 'app/helpers/jquery_sortable_tree_helper/render_expandable_tree_helper.rb', line 12

def h
  @h
end

#optionsObject

Returns the value of attribute options.



12
13
14
# File 'app/helpers/jquery_sortable_tree_helper/render_expandable_tree_helper.rb', line 12

def options
  @options
end

Instance Method Details

#div_itemObject



18
19
20
# File 'app/helpers/jquery_sortable_tree_helper/render_expandable_tree_helper.rb', line 18

def div_item
  h.(:div, handle + expand_button + edit_link + controls, class: :item)
end

#expand_buttonObject



22
23
24
# File 'app/helpers/jquery_sortable_tree_helper/render_expandable_tree_helper.rb', line 22

def expand_button
  h.(:b, '+', class: 'expand plus')
end