Sha256: 2ba69f925c8dd1361f388c801316d97a4654c1eadf61bb0f682e6ea5a601b750
Contents?: true
Size: 1.03 KB
Versions: 20
Compression:
Stored size: 1.03 KB
Contents
require 'hanami/utils/class_attribute' module Hanami module Action # Configuration API # # @since 0.2.0 # # @see Hanami::Controller::Configuration module Configurable # Override Ruby's hook for modules. # It includes configuration logic # # @param base [Class] the target action # # @since 0.2.0 # @api private # # @see http://www.ruby-doc.org/core-2.1.2/Module.html#method-i-included # # @example # require 'hanami/controller' # # class Show # include Hanami::Action # end # # Show.configuration def self.included(base) config = Hanami::Controller::Configuration.for(base) base.class_eval do include Utils::ClassAttribute class_attribute :configuration self.configuration = config end config.copy!(base) end private # @since 0.2.0 def configuration self.class.configuration end end end end
Version data entries
20 entries across 20 versions & 1 rubygems