Sha256: 1081c1a1c68c0591024f7accfda93832e266e1e736605bd8e230a36588b76d5f

Contents?: true

Size: 657 Bytes

Versions: 2

Compression:

Stored size: 657 Bytes

Contents

# frozen_string_literal: true

require 'action_table/version'
require 'action_table/railtie' if defined?(Rails)

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 :styles, :actions, :links
    attr_writer :rails_host_app

    def initialize
      @rails_host_app = nil
      @styles = []
      @actions = []
      @links = []
    end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
action_table-0.4.0 lib/action_table.rb
action_table-0.3.0 lib/action_table.rb