Sha256: d9bede0947d922f9902afa6dc7c36adb6e8cda79c440cddd14579ec29cf98f5c

Contents?: true

Size: 651 Bytes

Versions: 58

Compression:

Stored size: 651 Bytes

Contents

require_relative 'abstract_command_handler'

class LoadLibraryHandler < AbstractCommandHandler
  def initialize
    @required_parameters_count = 1
  end

  def process(command)
    begin
      if command.payload.length < @required_parameters_count
        raise ArgumentError.new "Load library parameters mismatch"
      end
      if command.payload.length > @required_parameters_count
        assembly_name = command.payload[1]
      else
        assembly_name = command.payload[0]
      end
      #noinspection RubyResolve
      require(assembly_name)
      return 0
    rescue Exception => e
      return e
    end
  end
end

Version data entries

58 entries across 29 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.5.7 lib/javonet-ruby-sdk/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.7 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.6 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.6 lib/javonet-ruby-sdk/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.5 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.5 lib/javonet-ruby-sdk/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.4 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.4 lib/javonet-ruby-sdk/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.3 lib/javonet-ruby-sdk/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.3 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.2 lib/javonet-ruby-sdk/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.2 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.1 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.1 lib/javonet-ruby-sdk/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.0 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.5.0 lib/javonet-ruby-sdk/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.4.11 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.4.11 lib/javonet-ruby-sdk/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.4.10 lib/javonet-ruby-sdk/core/handler/load_library_handler.rb
javonet-ruby-sdk-2.4.10 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb