Sha256: 18276048a44377e3fbb12d7629477e355e38c752c0747708eab227d753decd25
Contents?: true
Size: 575 Bytes
Versions: 25
Compression:
Stored size: 575 Bytes
Contents
# frozen_string_literal: true module Katalyst module Tables class Data def initialize(record:, column:) @record = record @column = column end def value return @value if defined?(@value) @value = @record&.public_send(@column) end def call ActionView::OutputBuffer.new.tap do |output| output << value.to_s end.to_s end alias to_s call def inspect "#<#{self.class.name} column: #{@column.inspect}, value: #{value.inspect}>" end end end end
Version data entries
25 entries across 25 versions & 1 rubygems