Class: Railbow::Table::Column
- Inherits:
-
Object
- Object
- Railbow::Table::Column
- Defined in:
- lib/railbow/table/column.rb
Instance Attribute Summary collapse
-
#align ⇒ Object
readonly
Returns the value of attribute align.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#max_width ⇒ Object
readonly
Returns the value of attribute max_width.
-
#min_width ⇒ Object
readonly
Returns the value of attribute min_width.
-
#sticky ⇒ Object
readonly
Returns the value of attribute sticky.
-
#truncate ⇒ Object
readonly
Returns the value of attribute truncate.
-
#truncate_fn ⇒ Object
readonly
Returns the value of attribute truncate_fn.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
- #fixed? ⇒ Boolean
-
#initialize(label:, width: :auto, min_width: nil, max_width: nil, align: :left, truncate: false, truncate_fn: nil, sticky: false) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(label:, width: :auto, min_width: nil, max_width: nil, align: :left, truncate: false, truncate_fn: nil, sticky: false) ⇒ Column
Returns a new instance of Column.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/railbow/table/column.rb', line 8 def initialize(label:, width: :auto, min_width: nil, max_width: nil, align: :left, truncate: false, truncate_fn: nil, sticky: false) @label = label @width = width @min_width = min_width @max_width = max_width @align = align @truncate = truncate @truncate_fn = truncate_fn @sticky = sticky end |
Instance Attribute Details
#align ⇒ Object (readonly)
Returns the value of attribute align.
6 7 8 |
# File 'lib/railbow/table/column.rb', line 6 def align @align end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
6 7 8 |
# File 'lib/railbow/table/column.rb', line 6 def label @label end |
#max_width ⇒ Object (readonly)
Returns the value of attribute max_width.
6 7 8 |
# File 'lib/railbow/table/column.rb', line 6 def max_width @max_width end |
#min_width ⇒ Object (readonly)
Returns the value of attribute min_width.
6 7 8 |
# File 'lib/railbow/table/column.rb', line 6 def min_width @min_width end |
#sticky ⇒ Object (readonly)
Returns the value of attribute sticky.
6 7 8 |
# File 'lib/railbow/table/column.rb', line 6 def sticky @sticky end |
#truncate ⇒ Object (readonly)
Returns the value of attribute truncate.
6 7 8 |
# File 'lib/railbow/table/column.rb', line 6 def truncate @truncate end |
#truncate_fn ⇒ Object (readonly)
Returns the value of attribute truncate_fn.
6 7 8 |
# File 'lib/railbow/table/column.rb', line 6 def truncate_fn @truncate_fn end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
6 7 8 |
# File 'lib/railbow/table/column.rb', line 6 def width @width end |
Instance Method Details
#fixed? ⇒ Boolean
19 20 21 |
# File 'lib/railbow/table/column.rb', line 19 def fixed? width.is_a?(Integer) end |