Sha256: a064f5b9940be47f7b540170080d44f23d785f46b41fa4e0b134d6e81a8aadf1

Contents?: true

Size: 1.23 KB

Versions: 5

Compression:

Stored size: 1.23 KB

Contents

# -*- coding: utf-8 -*-

class RailsDataExplorer
  module Utils

    # Responsibilities:
    #  * Provide classes to describe tables:
    #     rde_table.rows
    #       rde_row.css_class
    #       rde_row.tag
    #       rde_row.cells
    #         rde_cell.css_class
    #         rde_cell.ruby_formatter
    #         rde_cell.style
    #         rde_cell.tag
    #         rde_cell.title
    #         rde_cell.value
    #
    class RdeTable

      attr_accessor :rows

      def initialize(rows)
        @rows = rows
      end

    end


    class RdeTableRow

      attr_accessor :cells
      attr_accessor :css_class
      attr_accessor :tag

      def initialize(tag, cells, opts = {})
        @tag = tag
        @cells =cells
        @css_class = opts[:css_class]
      end

    end

    class RdeTableCell

      attr_accessor :tag
      attr_accessor :value
      attr_accessor :css_class
      attr_accessor :ruby_formatter
      attr_accessor :style
      attr_accessor :title

      def initialize(tag, value, opts = {})
        @tag = tag
        @value = value
        @css_class = opts[:css_class]
        @ruby_formatter = opts[:ruby_formatter]
        @style = opts[:style]
        @title = opts[:title]
      end

    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails-data-explorer-1.0.4 lib/rails_data_explorer/utils/rde_table.rb
rails-data-explorer-1.0.3 lib/rails_data_explorer/utils/rde_table.rb
rails-data-explorer-1.0.2 lib/rails_data_explorer/utils/rde_table.rb
rails-data-explorer-1.0.1 lib/rails_data_explorer/utils/rde_table.rb
rails-data-explorer-1.0.0 lib/rails_data_explorer/utils/rde_table.rb