Sha256: e17961a958128f106de0164fd4ab7cb8bd8d076e17e4560e1a700af4319a4e21
Contents?: true
Size: 691 Bytes
Versions: 9
Compression:
Stored size: 691 Bytes
Contents
module Praxis module PluginConcern extend ::ActiveSupport::Concern included do @setup = false end module ClassMethods PLUGIN_CLASSES = [ :Request, :Controller, :EndpointDefinition, :ActionDefinition, :Response, :ApiGeneralInfo ] 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