Class: Layout::Index::Cell
- Inherits:
-
Cell
- Object
- Cell
- Layout::Index::Cell
- Defined in:
- app/cells/lato_view/layout/index/cell.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#custom_class ⇒ Object
Returns the value of attribute custom_class.
-
#delete_link ⇒ Object
writeonly
Sets the attribute delete_link.
-
#edit_link ⇒ Object
writeonly
Sets the attribute edit_link.
-
#elements ⇒ Object
Returns the value of attribute elements.
-
#head ⇒ Object
return ingex head.
-
#link ⇒ Object
Returns the value of attribute link.
-
#remote_delete ⇒ Object
Returns the value of attribute remote_delete.
-
#show_link ⇒ Object
writeonly
Sets the attribute show_link.
Instance Method Summary collapse
-
#close ⇒ Object
return index end.
-
#initialize(elements: nil, head: nil, attributes: nil, link: nil, show_link: true, edit_link: true, delete_link: true, remote_delete: false, custom_class: nil) ⇒ Cell
constructor
A new instance of Cell.
-
#open ⇒ Object
open index table.
-
#rows ⇒ Object
return index rows.
- #show ⇒ Object
Constructor Details
#initialize(elements: nil, head: nil, attributes: nil, link: nil, show_link: true, edit_link: true, delete_link: true, remote_delete: false, custom_class: nil) ⇒ Cell
Returns a new instance of Cell.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 7 def initialize(elements: nil, head: nil, attributes: nil, link: nil, show_link: true, edit_link: true, delete_link: true, remote_delete: false, custom_class: nil) # save params @elements = elements @head = head @attributes = attributes @link = link @show_link = show_link @edit_link = edit_link @delete_link = delete_link @remote_delete = remote_delete @custom_class = custom_class # check params check_params end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
4 5 6 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 4 def attributes @attributes end |
#custom_class ⇒ Object
Returns the value of attribute custom_class.
4 5 6 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 4 def custom_class @custom_class end |
#delete_link=(value) ⇒ Object
Sets the attribute delete_link
4 5 6 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 4 def delete_link=(value) @delete_link = value end |
#edit_link=(value) ⇒ Object
Sets the attribute edit_link
4 5 6 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 4 def edit_link=(value) @edit_link = value end |
#elements ⇒ Object
Returns the value of attribute elements.
4 5 6 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 4 def elements @elements end |
#head ⇒ Object
return ingex head
34 35 36 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 34 def head @head end |
#link ⇒ Object
Returns the value of attribute link.
4 5 6 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 4 def link @link end |
#remote_delete ⇒ Object
Returns the value of attribute remote_delete.
4 5 6 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 4 def remote_delete @remote_delete end |
#show_link=(value) ⇒ Object
Sets the attribute show_link
4 5 6 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 4 def show_link=(value) @show_link = value end |
Instance Method Details
#close ⇒ Object
return index end
44 45 46 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 44 def close '</table>' end |
#open ⇒ Object
open index table
29 30 31 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 29 def open "<table class='table #{@custom_class}'>" end |
#rows ⇒ Object
return index rows
39 40 41 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 39 def rows render 'rows.html' end |
#show ⇒ Object
24 25 26 |
# File 'app/cells/lato_view/layout/index/cell.rb', line 24 def show open + head + rows + close end |