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