Class: Hoth::Transport::Bert

Inherits:
Base
  • Object
show all
Defined in:
lib/hoth/transport/bert.rb

Defined Under Namespace

Classes: Deserializer, TuplePreparer

Instance Attribute Summary

Attributes inherited from Base

#encoder

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Hoth::Transport::Base

Instance Method Details

#call_remote_with(*args) ⇒ Object



69
70
71
72
73
74
75
76
77
78
79
# File 'lib/hoth/transport/bert.rb', line 69

def call_remote_with(*args)
  bert_service = BERTRPC::Service.new(self.endpoint.host, self.endpoint.port)
  
  response = bert_service.call.send(self.name).execute(*TuplePreparer.prepare(args))
  
  if self.return_value
    return Deserializer.deserialize(response)
  else
    return true
  end
end

#decode_params(params) ⇒ Object



81
82
83
# File 'lib/hoth/transport/bert.rb', line 81

def decode_params(params)
  Deserializer.deserialize(params)
end