Sha256: 48f38665226bf58d2b2485fd9de86e16d7e4015fdac1f9db79444e3446ed647b

Contents?: true

Size: 556 Bytes

Versions: 2

Compression:

Stored size: 556 Bytes

Contents

# frozen_string_literal: true

require_relative "base"

module Katalyst
  module Tables
    module Frontend
      module Builder
        class BodyRow < Base # :nodoc:
          attr_reader :object

          def initialize(table, object)
            super table

            @object = object
          end

          def build
            table_tag(:tr) { yield self, object }
          end

          def cell(method, **options, &block)
            table_body_cell(object, method, **options, &block)
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
katalyst-tables-1.1.0 lib/katalyst/tables/frontend/builder/body_row.rb
katalyst-tables-1.0.0 lib/katalyst/tables/frontend/builder/body_row.rb