Sha256: 3cdbebe2d6ec526925a07e9796e5350f5765d699e5203ad1d222cc333c5d0aa1

Contents?: true

Size: 416 Bytes

Versions: 35

Compression:

Stored size: 416 Bytes

Contents

module Evertils
  module Helper
    def self.load(klass, *args)
      begin
        klass_instance = Evertils::Helper.const_get(klass)

        if klass_instance
          if args.empty?
            klass_instance.new
          else
            klass_instance.new(args)
          end
        end
      rescue => e
        Notify.error("#{e}\n#{e.backtrace.join("\n")}", show_time: false)
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
evertils-1.0.12 lib/evertils/helper.rb
evertils-1.0.11 lib/evertils/helper.rb
evertils-1.0.10 lib/evertils/helper.rb
evertils-1.0.9 lib/evertils/helper.rb
evertils-1.0.8 lib/evertils/helper.rb
evertils-1.0.7 lib/evertils/helper.rb
evertils-1.0.6 lib/evertils/helper.rb
evertils-1.0.5 lib/evertils/helper.rb
evertils-1.0.4 lib/evertils/helper.rb
evertils-1.0.3 lib/evertils/helper.rb
evertils-1.0.2 lib/evertils/helper.rb
evertils-1.0.1 lib/evertils/helper.rb
evertils-1.0.0 lib/evertils/helper.rb
evertils-0.4.0 lib/evertils/helper.rb
evertils-0.3.27 lib/evertils/helper.rb
evertils-0.3.26 lib/evertils/helper.rb
evertils-0.3.25 lib/evertils/helper.rb
evertils-0.3.24 lib/evertils/helper.rb
evertils-0.3.23 lib/evertils/helper.rb
evertils-0.3.22 lib/evertils/helper.rb