Sha256: c31177adf71f00177cf8713a9338548d21202b27ef72190f609d8b2c882ddd71

Contents?: true

Size: 639 Bytes

Versions: 28

Compression:

Stored size: 639 Bytes

Contents

require_relative '../reference_cache/references_cache'
require_relative 'abstract_command_handler'

class ResolveInstanceHandler < AbstractCommandHandler
  def initialize
    @required_parameters_count = 1
  end

  def process(command)
    return resolve_reference(command)
  end

  def resolve_reference(command)
    if command.payload.length != @required_parameters_count
      raise ArgumentError.new "Resolve Instance parameters mismatch"
    end
    begin
      references_cache = ReferencesCache.instance
      return references_cache.resolve_reference(command.payload[0])
    rescue Exception => ex
      return ex
    end
  end
end

Version data entries

28 entries across 14 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.4.9 lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.9 lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.8 lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.8 lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.7 lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.7 lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.6 lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.6 lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/handler/resolve_instance_handler.rb