Sha256: a944887141056fb2b88d8cd4e3b18ab698427f9abb36e37a72fd6e839aa77433

Contents?: true

Size: 374 Bytes

Versions: 2

Compression:

Stored size: 374 Bytes

Contents

# frozen_string_literal: true

require 'i_am_i_can/configs/configs'

module IAmICan
  module Configurable
    extend ActiveSupport::Concern

    class_methods do
      def i_am_i_can
        Configs.get(self.name)
      end
    end

    included do
      def i_am_i_can
        Configs.get(self.class.name)
      end

      delegate :_reflect_of, to: self
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
i_am_i_can-4.4.1 lib/i_am_i_can/support/configurable.rb
i_am_i_can-4.4.0 lib/i_am_i_can/support/configurable.rb