Class: UtilsDrawer::TableDrawer::Column
- Inherits:
-
Object
- Object
- UtilsDrawer::TableDrawer::Column
- Includes:
- ColumnValidator
- Defined in:
- lib/utils_drawer/table_drawer/column.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, size) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(text, size) ⇒ Column
Returns a new instance of Column.
11 12 13 14 15 16 17 |
# File 'lib/utils_drawer/table_drawer/column.rb', line 11 def initialize(text, size) # Ignore ANSI escape sequences pure_text = text.to_pure text += ' ' * (size - pure_text.size) if !size.nil? && size > pure_text.size @text = text end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
9 10 11 |
# File 'lib/utils_drawer/table_drawer/column.rb', line 9 def text @text end |