Class: Rack::RPC::Endpoint::JSONRPC::Notification
- Defined in:
- lib/rack/rpc/endpoint/jsonrpc.rb
Overview
JSON-RPC notification objects.
Direct Known Subclasses
Constant Summary
Constants inherited from Object
Instance Attribute Summary collapse
-
#method ⇒ Object
Returns the value of attribute method.
-
#params ⇒ Object
Returns the value of attribute params.
-
#version ⇒ Object
Returns the value of attribute version.
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
#method ⇒ Object
Returns the value of attribute method.
146 147 148 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 146 def method @method end |
#params ⇒ Object
Returns the value of attribute params.
147 148 149 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 147 def params @params end |
#version ⇒ Object
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
#to_hash ⇒ 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 |
#valid? ⇒ Boolean
151 152 153 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 151 def valid? true # TODO end |