Class: TableStructure::Schema::Column
- Inherits:
-
Object
- Object
- TableStructure::Schema::Column
- Defined in:
- lib/table_structure/schema/column.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name(header_context, table_context) ⇒ Object
readonly
Returns the value of attribute name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#vlaue ⇒ Object
readonly
Returns the value of attribute vlaue.
Instance Method Summary collapse
-
#initialize(name:, key:, value:, size:) ⇒ Column
constructor
A new instance of Column.
- #value(row_context, table_context) ⇒ Object
Constructor Details
#initialize(name:, key:, value:, size:) ⇒ Column
Returns a new instance of Column.
8 9 10 11 12 13 |
# File 'lib/table_structure/schema/column.rb', line 8 def initialize(name:, key:, value:, size:) @name = name @key = key @value = value @size = size end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/table_structure/schema/column.rb', line 6 def key @key end |
#name(header_context, table_context) ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/table_structure/schema/column.rb', line 6 def name @name end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
6 7 8 |
# File 'lib/table_structure/schema/column.rb', line 6 def size @size end |
#vlaue ⇒ Object (readonly)
Returns the value of attribute vlaue.
6 7 8 |
# File 'lib/table_structure/schema/column.rb', line 6 def vlaue @vlaue end |
Instance Method Details
#value(row_context, table_context) ⇒ Object
24 25 26 27 |
# File 'lib/table_structure/schema/column.rb', line 24 def value(row_context, table_context) value = Utils.evaluate_callable(@value, row_context, table_context) optimize_size(value) end |