Class: RubyJard::Row

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#columnsObject

Returns the value of attribute columns.



9
10
11
# File 'lib/ruby_jard/row.rb', line 9

def columns
  @columns
end

#contentObject

Returns the value of attribute content.



9
10
11
# File 'lib/ruby_jard/row.rb', line 9

def content
  @content
end

#line_limitObject

Returns the value of attribute line_limit.



9
10
11
# File 'lib/ruby_jard/row.rb', line 9

def line_limit
  @line_limit
end

#renderedObject

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_renderedObject



23
24
25
# File 'lib/ruby_jard/row.rb', line 23

def mark_rendered
  @rendered = true
end

#rendered?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/ruby_jard/row.rb', line 19

def rendered?
  @rendered == true
end

#reset_renderedObject



27
28
29
# File 'lib/ruby_jard/row.rb', line 27

def reset_rendered
  @rendered = false
end