Module: Campo::Plugins::Pluggable

Included in:
Plugin
Defined in:
lib/campo/plugins.rb

Instance Method Summary collapse

Instance Method Details

#after_output(&block) ⇒ Object



11
12
13
# File 'lib/campo/plugins.rb', line 11

def after_output( &block )
  afters << block
end

#before_output(&block) ⇒ Object



7
8
9
# File 'lib/campo/plugins.rb', line 7

def before_output( &block )
  befores << block
end

#extrasObject



19
20
21
# File 'lib/campo/plugins.rb', line 19

def extras
  @extras ||= proc {}
end

#on_plugin(&block) ⇒ Object



15
16
17
# File 'lib/campo/plugins.rb', line 15

def on_plugin( &block )
  @extras = block
end

#plugged_inObject



23
24
25
# File 'lib/campo/plugins.rb', line 23

def plugged_in
  instance_exec &@extras
end