Sha256: 7fc3e298cd7db6e4ede6405bb4de70a8be57a6b58610f3eb662af47ebf34252e

Contents?: true

Size: 449 Bytes

Versions: 12

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true

require_relative 'config'

module Coactive
  module Configure
    extend ActiveSupport::Concern

    included do
      class_attribute :coactive_config
      self.coactive_config = Config.new
      self.coactive_config.base_class = self
    end

    class_methods do
      def configure_coactive
        self.coactive_config = Config.new(coactive_config.data)
        yield coactive_config
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
coactive-0.6.0 lib/coactive/configure.rb
coactive-0.5.2 lib/coactive/configure.rb
coactive-0.5.1 lib/coactive/configure.rb
coactive-0.5.0 lib/coactive/configure.rb
coactive-0.4.1 lib/coactive/configure.rb
coactive-0.4.0 lib/coactive/configure.rb
coactive-0.3.0 lib/coactive/configure.rb
coactive-0.2.2 lib/coactive/configure.rb
coactive-0.2.1 lib/coactive/configure.rb
coactive-0.2.0 lib/coactive/configure.rb
coactive-0.1.2 lib/coactive/configure.rb
coactive-0.1.1 lib/coactive/configure.rb