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
Constants inherited from Object
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Attributes inherited from Notification
Attributes inherited from Object
Instance Method Summary collapse
Methods inherited from Object
Constructor Details
This class inherits a constructor from Rack::RPC::Endpoint::JSONRPC::Object
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
169 170 171 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 169 def id @id end |
Instance Method Details
#to_args ⇒ Array
187 188 189 190 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 187 def to_args # used from Operation#initialize params end |
#to_hash ⇒ Hash
179 180 181 182 183 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 179 def to_hash super.merge({ :id => id, }) end |
#valid? ⇒ Boolean
173 174 175 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 173 def valid? super && !id.nil? end |