Module: Praxis::PluginConcern::ClassMethods
- Defined in:
- lib/praxis/plugin_concern.rb
Constant Summary collapse
- PLUGIN_CLASSES =
[ :Request, :Controller, :ResourceDefinition, :ActionDefinition, :Response ]
Instance Method Summary collapse
Instance Method Details
#inject!(name) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/praxis/plugin_concern.rb', line 31 def inject!(name) plugin = self.const_get(name) praxis = Praxis.const_get(name) praxis.include(plugin) end |
#setup! ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/praxis/plugin_concern.rb', line 19 def setup! return if @setup PLUGIN_CLASSES.each do |name| if self.constants.include?(name) inject!(name) end end @setup = true end |