Class: Rack::RPC::Endpoint::JSONRPC::Notification
- Inherits:
-
Object
- Object
- Object
- Rack::RPC::Endpoint::JSONRPC::Notification
- Defined in:
- lib/rack/rpc/endpoint/jsonrpc.rb
Overview
JSON-RPC notification objects.
Direct Known Subclasses
Constant Summary
Instance Attribute Summary (collapse)
-
- (Object) context
inherited
from Object
readonly
An arbitrary context associated with the object.
-
- (void) method
Returns the value of attribute method.
-
- (void) params
Returns the value of attribute params.
-
- (void) version
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) method
Returns the value of attribute method
146 147 148 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 146 def method @method end |
- (void) params
Returns the value of attribute params
147 148 149 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 147 def params @params end |
- (void) version
Returns the value of attribute version
145 146 147 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 145 def version @version end |
Instance Method Details
- (Hash) to_hash
157 158 159 160 161 162 163 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 157 def to_hash { :jsonrpc => (version || VERSION).to_s, :method => method.to_s, :params => params ? params.to_a : [], # NOTE: named arguments not supported } end |
- (Boolean) valid?
151 152 153 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 151 def valid? true # TODO end |