Sha256: b44ec532ea4379e068a1581ef182ea9af677f066289a1961f05d175adaafe8fa

Contents?: true

Size: 808 Bytes

Versions: 34

Compression:

Stored size: 808 Bytes

Contents

require 'java'

require 'killbill/killbill_api'

include Java

module Killbill
  module Plugin
    class Creator

      attr_reader :target_class_name

      def initialize(target_class_name)
        @target_class_name = target_class_name
      end

      def create(services)
        real_class = @target_class_name.to_class

        plugin_delegate = real_class.new
        plugin_delegate.root = services.delete("root")
        plugin_delegate.logger = services.delete("logger")
        plugin_delegate.conf_dir = services.delete("conf_dir")
        # At this point we removed everything from the map which is not API, so we can build the APIs
        kb_apis = KillbillApi.new(@target_class_name, services)
        plugin_delegate.kb_apis = kb_apis
        plugin_delegate
      end


    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
killbill-3.2.2 lib/killbill/creator.rb
killbill-3.2.1 lib/killbill/creator.rb
killbill-3.2.0 lib/killbill/creator.rb
killbill-3.1.12 lib/killbill/creator.rb
killbill-3.1.11 lib/killbill/creator.rb
killbill-3.1.10 lib/killbill/creator.rb
killbill-3.1.9 lib/killbill/creator.rb
killbill-3.1.8 lib/killbill/creator.rb
killbill-3.1.7 lib/killbill/creator.rb
killbill-3.1.6 lib/killbill/creator.rb
killbill-3.1.5 lib/killbill/creator.rb
killbill-3.1.4 lib/killbill/creator.rb
killbill-3.1.3 lib/killbill/creator.rb
killbill-3.1.2 lib/killbill/creator.rb
killbill-3.1.1 lib/killbill/creator.rb
killbill-3.1.0 lib/killbill/creator.rb
killbill-3.0.0 lib/killbill/creator.rb
killbill-2.0.1 lib/killbill/creator.rb
killbill-2.0.0 lib/killbill/creator.rb
killbill-1.9.0 lib/killbill/creator.rb