Class: Campo::Plugins::Partial::Klass
- Inherits:
-
Campo::Plugins::Plugin
- Object
- Campo::Plugins::Plugin
- Campo::Plugins::Partial::Klass
- Defined in:
- lib/campo/plugins/partial.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{partial: false}
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Klass
constructor
A new instance of Klass.
Methods inherited from Campo::Plugins::Plugin
Methods included from Campo::Plugins::Pluggable
#after_output, #before_output, #extras, #on_plugin, #plugged_in
Constructor Details
#initialize(opts = {}) ⇒ Klass
Returns a new instance of Klass.
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/campo/plugins/partial.rb', line 31 def initialize( opts={} ) after_output do |output,| [:partial] ? output : # partial declarations + output # whole form end on_plugin do Campo::Outputter.send(:include, Campo::Plugins::Partial::InstanceMethods) Campo::Outputter::DEFAULT_OPTIONS.merge!({partial: false}) end end |