Class: WampClient::Message::Yield
- Defined in:
- lib/wamp_client/message.rb
Overview
Yield Actual yield from an endpoint sent by a Callee to Dealer. Formats:
[YIELD, INVOCATION.Request|id, Options|dict]
[YIELD, INVOCATION.Request|id, Options|dict, Arguments|list]
[YIELD, INVOCATION.Request|id, Options|dict, Arguments|list, ArgumentsKw|dict]
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#argumentskw ⇒ Object
Returns the value of attribute argumentskw.
-
#invocation_request ⇒ Object
Returns the value of attribute invocation_request.
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(invocation_request, options, arguments = nil, argumentskw = nil) ⇒ Yield
constructor
A new instance of Yield.
- #payload ⇒ Object
- #to_s ⇒ Object
Methods included from Check
Constructor Details
#initialize(invocation_request, options, arguments = nil, argumentskw = nil) ⇒ Yield
Returns a new instance of Yield.
1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 |
# File 'lib/wamp_client/message.rb', line 1081 def initialize(invocation_request, , arguments=nil, argumentskw=nil) self.class.check_id('invocation_request', invocation_request) self.class.check_dict('options', ) self.class.check_list('arguments', arguments, true) self.class.check_dict('argumentskw', argumentskw, true) self.invocation_request = invocation_request self. = self.arguments = arguments self.argumentskw = argumentskw end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
1079 1080 1081 |
# File 'lib/wamp_client/message.rb', line 1079 def arguments @arguments end |
#argumentskw ⇒ Object
Returns the value of attribute argumentskw.
1079 1080 1081 |
# File 'lib/wamp_client/message.rb', line 1079 def argumentskw @argumentskw end |
#invocation_request ⇒ Object
Returns the value of attribute invocation_request.
1079 1080 1081 |
# File 'lib/wamp_client/message.rb', line 1079 def invocation_request @invocation_request end |
#options ⇒ Object
Returns the value of attribute options.
1079 1080 1081 |
# File 'lib/wamp_client/message.rb', line 1079 def end |
Class Method Details
.parse(params) ⇒ Object
1099 1100 1101 1102 1103 1104 1105 1106 1107 |
# File 'lib/wamp_client/message.rb', line 1099 def self.parse(params) self.check_gte('params list', 3, params.count) self.check_equal('message type', self.type, params[0]) params.shift self.new(*params) end |
.type ⇒ Object
1095 1096 1097 |
# File 'lib/wamp_client/message.rb', line 1095 def self.type Types::YIELD end |
Instance Method Details
#payload ⇒ Object
1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 |
# File 'lib/wamp_client/message.rb', line 1109 def payload payload = [self.class.type] payload.push(self.invocation_request) payload.push(self.) return payload if (self.arguments.nil? or self.arguments.empty?) payload.push(self.arguments) return payload if (self.argumentskw.nil? or self.argumentskw.empty?) payload.push(self.argumentskw) payload end |
#to_s ⇒ Object
1123 1124 1125 |
# File 'lib/wamp_client/message.rb', line 1123 def to_s 'YIELD > ' + self.payload.to_s end |