Class: Killbill::Plugin::JPlugin
Direct Known Subclasses
Instance Attribute Summary collapse
-
#delegate_plugin ⇒ Object
readonly
Returns the value of attribute delegate_plugin.
-
#rack_handler ⇒ Object
readonly
Returns the value of attribute rack_handler.
Instance Method Summary collapse
-
#initialize(plugin_class_name, services = {}) ⇒ JPlugin
constructor
Called by the Killbill lifecycle when instantiating the plugin.
- #is_active ⇒ Object
- #logger ⇒ Object
-
#start_plugin ⇒ Object
Called by the Killbill lifecycle when initializing the plugin.
-
#stop_plugin ⇒ Object
Called by the Killbill lifecycle when stopping the plugin.
Constructor Details
Instance Attribute Details
#delegate_plugin ⇒ Object (readonly)
Returns the value of attribute delegate_plugin.
19 20 21 |
# File 'lib/killbill/jplugin.rb', line 19 def delegate_plugin @delegate_plugin end |
#rack_handler ⇒ Object (readonly)
Returns the value of attribute rack_handler.
19 20 21 |
# File 'lib/killbill/jplugin.rb', line 19 def rack_handler @rack_handler end |
Instance Method Details
#is_active ⇒ Object
35 36 37 |
# File 'lib/killbill/jplugin.rb', line 35 def is_active @delegate_plugin.active end |
#logger ⇒ Object
44 45 46 47 |
# File 'lib/killbill/jplugin.rb', line 44 def logger require 'logger' @delegate_plugin.nil? ? ::Logger.new(STDOUT) : @delegate_plugin.logger end |
#start_plugin ⇒ Object
Called by the Killbill lifecycle when initializing the plugin
24 25 26 27 |
# File 'lib/killbill/jplugin.rb', line 24 def start_plugin @delegate_plugin.start_plugin configure_rack_handler end |
#stop_plugin ⇒ Object
Called by the Killbill lifecycle when stopping the plugin
30 31 32 33 |
# File 'lib/killbill/jplugin.rb', line 30 def stop_plugin unconfigure_rack_handler @delegate_plugin.stop_plugin end |