Class: RubyJard::Row
- Inherits:
-
Object
- Object
- RubyJard::Row
- Extended by:
- Forwardable
- Defined in:
- lib/ruby_jard/row.rb
Overview
This class is an object to store a row of data display on a screen
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#content ⇒ Object
Returns the value of attribute content.
-
#line_limit ⇒ Object
Returns the value of attribute line_limit.
-
#rendered ⇒ Object
Returns the value of attribute rendered.
Instance Method Summary collapse
-
#initialize(line_limit: 1, columns: [], ellipsis: true) ⇒ Row
constructor
A new instance of Row.
- #mark_rendered ⇒ Object
- #rendered? ⇒ Boolean
- #reset_rendered ⇒ Object
Constructor Details
#initialize(line_limit: 1, columns: [], ellipsis: true) ⇒ Row
Returns a new instance of Row.
11 12 13 14 15 16 17 |
# File 'lib/ruby_jard/row.rb', line 11 def initialize(line_limit: 1, columns: [], ellipsis: true) @content = [] @columns = columns @ellipsis = ellipsis @line_limit = line_limit @rendered = false end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
9 10 11 |
# File 'lib/ruby_jard/row.rb', line 9 def columns @columns end |
#content ⇒ Object
Returns the value of attribute content.
9 10 11 |
# File 'lib/ruby_jard/row.rb', line 9 def content @content end |
#line_limit ⇒ Object
Returns the value of attribute line_limit.
9 10 11 |
# File 'lib/ruby_jard/row.rb', line 9 def line_limit @line_limit end |
#rendered ⇒ Object
Returns the value of attribute rendered.
9 10 11 |
# File 'lib/ruby_jard/row.rb', line 9 def rendered @rendered end |
Instance Method Details
#mark_rendered ⇒ Object
23 24 25 |
# File 'lib/ruby_jard/row.rb', line 23 def mark_rendered @rendered = true end |
#rendered? ⇒ Boolean
19 20 21 |
# File 'lib/ruby_jard/row.rb', line 19 def rendered? @rendered == true end |
#reset_rendered ⇒ Object
27 28 29 |
# File 'lib/ruby_jard/row.rb', line 27 def reset_rendered @rendered = false end |