Sha256: 698d273a2342e37e1c4b248f68935b2a4fc64a540b91ec6a29952311c3272e95
Contents?: true
Size: 666 Bytes
Versions: 9
Compression:
Stored size: 666 Bytes
Contents
module Praxis module PluginConcern extend ::ActiveSupport::Concern included do @setup = false end module ClassMethods PLUGIN_CLASSES = [ :Request, :Controller, :ResourceDefinition, :ActionDefinition, :Response ] def setup! return if @setup PLUGIN_CLASSES.each do |name| if self.constants.include?(name) inject!(name) end end @setup = true end def inject!(name) plugin = self.const_get(name) praxis = Praxis.const_get(name) praxis.include(plugin) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems