Sha256: b0fec6d0594167e28a04dcd3fda8563d83f000718909c7d5488acf7b5b424871

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

# frozen_string_literal: true

require 'action_table/version'
require 'action_table/railtie'

module ActionTable
  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.config
    configuration
  end

  def self.configure
    yield(configuration) if block_given?
    configuration
  end

  class Configuration
    attr_accessor :table_styles
    attr_writer :rails_host_app

    def initialize
      @rails_host_app = nil
      @table_styles = []
    end

    def rails_host_app
      @rails_host_app || raise('rails host app must be configured!')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
action_table-0.1.0 lib/action_table.rb