Class: RubyJard::Column
- Inherits:
-
Object
- Object
- RubyJard::Column
- Extended by:
- Forwardable
- Defined in:
- lib/ruby_jard/column.rb
Overview
This class is an object to contain information of a column in a data drow display on a screen
Constant Summary collapse
- WORD_WRAP_NORMAL =
Only break at breakable word | this_is_a <endline> | | really_long_content |
:normal
- WORD_WRAP_BREAK_WORD =
Break the word, and move the rest to the next line | this_is_a really_lon| | g_content |
:break_word
Instance Attribute Summary collapse
-
#content_length ⇒ Object
Returns the value of attribute content_length.
-
#content_width ⇒ Object
Returns the value of attribute content_width.
-
#spans ⇒ Object
Returns the value of attribute spans.
-
#width ⇒ Object
Returns the value of attribute width.
-
#word_wrap ⇒ Object
Returns the value of attribute word_wrap.
Instance Method Summary collapse
-
#initialize(spans: [], word_wrap: WORD_WRAP_NORMAL) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(spans: [], word_wrap: WORD_WRAP_NORMAL) ⇒ Column
Returns a new instance of Column.
19 20 21 22 23 24 |
# File 'lib/ruby_jard/column.rb', line 19 def initialize(spans: [], word_wrap: WORD_WRAP_NORMAL) @spans = spans @width = 0 @content_length = 0 @word_wrap = word_wrap end |
Instance Attribute Details
#content_length ⇒ Object
Returns the value of attribute content_length.
17 18 19 |
# File 'lib/ruby_jard/column.rb', line 17 def content_length @content_length end |
#content_width ⇒ Object
Returns the value of attribute content_width.
17 18 19 |
# File 'lib/ruby_jard/column.rb', line 17 def content_width @content_width end |
#spans ⇒ Object
Returns the value of attribute spans.
17 18 19 |
# File 'lib/ruby_jard/column.rb', line 17 def spans @spans end |
#width ⇒ Object
Returns the value of attribute width.
17 18 19 |
# File 'lib/ruby_jard/column.rb', line 17 def width @width end |
#word_wrap ⇒ Object
Returns the value of attribute word_wrap.
17 18 19 |
# File 'lib/ruby_jard/column.rb', line 17 def word_wrap @word_wrap end |