Class: Rack::RPC::Endpoint::JSONRPC::Request
- Inherits:
-
Notification
- Object
- Object
- Notification
- Rack::RPC::Endpoint::JSONRPC::Request
- Defined in:
- lib/rack/rpc/endpoint/jsonrpc.rb
Overview
JSON-RPC request objects.
Constant Summary
Instance Attribute Summary (collapse)
-
- (Object) context
inherited
from Object
readonly
An arbitrary context associated with the object.
-
- (void) id
Returns the value of attribute id.
-
- (void) method
inherited
from Notification
Returns the value of attribute method.
-
- (void) params
inherited
from Notification
Returns the value of attribute params.
-
- (void) version
inherited
from Notification
Returns the value of attribute version.
Instance Method Summary (collapse)
Constructor Details
This class inherits a constructor from Rack::RPC::Endpoint::JSONRPC::Object
Instance Attribute Details
- (Object) context (readonly) Originally defined in class Object
An arbitrary context associated with the object.
- (void) id
Returns the value of attribute id
169 170 171 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 169 def id @id end |
- (void) method Originally defined in class Notification
Returns the value of attribute method
- (void) params Originally defined in class Notification
Returns the value of attribute params
- (void) version Originally defined in class Notification
Returns the value of attribute version
Instance Method Details
- (Array) to_args
187 188 189 190 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 187 def to_args # used from Operation#initialize params end |
- (Hash) to_hash
179 180 181 182 183 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 179 def to_hash super.merge({ :id => id, }) end |
- (Boolean) valid?
173 174 175 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 173 def valid? super && !id.nil? end |