Sha256: ff220b149731d74506933e51e51f4ac462206ffad5782e0a7f2080415a5bbe70
Contents?: true
Size: 522 Bytes
Versions: 13
Compression:
Stored size: 522 Bytes
Contents
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(*args) real_class = class_from_string args.nil? ? real_class.new : real_class.new(*args) end private def class_from_string() @target_class_name.split('::').inject(Kernel) do |mod, class_name| mod.const_get(class_name) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems