Class: Admino::Table::Row
- Inherits:
-
Object
- Object
- Admino::Table::Row
- Defined in:
- lib/admino/table/row.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#view_context ⇒ Object
(also: #h)
readonly
Returns the value of attribute view_context.
Instance Method Summary collapse
-
#initialize(view_context) ⇒ Row
constructor
A new instance of Row.
- #parse_action_args(args) ⇒ Object
- #parse_column_args(args) ⇒ Object
- #to_html ⇒ Object
Constructor Details
#initialize(view_context) ⇒ Row
Returns a new instance of Row.
8 9 10 |
# File 'lib/admino/table/row.rb', line 8 def initialize(view_context) @view_context = view_context end |
Instance Attribute Details
#view_context ⇒ Object (readonly) Also known as: h
Returns the value of attribute view_context.
4 5 6 |
# File 'lib/admino/table/row.rb', line 4 def view_context @view_context end |
Instance Method Details
#parse_action_args(args) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/admino/table/row.rb', line 30 def parse_action_args(args) = args. action_name = if args.first.is_a?(Symbol) args.shift else nil end url = if args.first.is_a?(String) args.shift else nil end label = args.shift [action_name, url, label, ] end |
#parse_column_args(args) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/admino/table/row.rb', line 12 def parse_column_args(args) = args. attribute_name = if args.first.is_a?(Symbol) args.shift else nil end label = if args.first.is_a?(String) || args.first.is_a?(Symbol) args.shift else nil end [attribute_name, label, ] end |
#to_html ⇒ Object
50 51 52 |
# File 'lib/admino/table/row.rb', line 50 def to_html nil end |