Sha256: 13e886416780ef591b4bc82a27733e40dd5e2ba00387fff38855e20f11cab746

Contents?: true

Size: 491 Bytes

Versions: 1

Compression:

Stored size: 491 Bytes

Contents

require 'csv_row_model/internal/concerns/column_shared'

module CsvRowModel
  class AttributeBase
    include ColumnShared

    attr_reader :column_name, :row_model

    def initialize(column_name, row_model)
      @column_name = column_name
      @row_model = row_model
    end

    def formatted_value
      @formatted_value ||= row_model_class.format_cell(source_value, column_name, column_index, row_model.context)
    end

    def row_model_class
      row_model.class
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
csv_row_model-1.0.0.beta2 lib/csv_row_model/internal/attribute_base.rb