Class: Rack::RPC::Endpoint::JSONRPC::Error
- Inherits:
-
Object
- Object
- Object
- Rack::RPC::Endpoint::JSONRPC::Error
- Defined in:
- lib/rack/rpc/endpoint/jsonrpc.rb
Overview
JSON-RPC error objects.
Direct Known Subclasses
ArgumentError, ClientError, InternalError, NoMethodError, ParseError, ServerError
Constant Summary
Instance Attribute Summary (collapse)
-
- (void) code
Returns the value of attribute code.
-
- (Object) context
inherited
from Object
readonly
An arbitrary context associated with the object.
-
- (void) data
Returns the value of attribute data.
-
- (void) message
Returns the value of attribute message.
Instance Method Summary (collapse)
Constructor Details
This class inherits a constructor from Rack::RPC::Endpoint::JSONRPC::Object
Instance Attribute Details
- (void) code
Returns the value of attribute code
216 217 218 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 216 def code @code end |
- (Object) context (readonly) Originally defined in class Object
An arbitrary context associated with the object.
- (void) data
Returns the value of attribute data
218 219 220 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 218 def data @data end |
- (void) message
Returns the value of attribute message
217 218 219 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 217 def @message end |
Instance Method Details
- (Hash) to_hash
222 223 224 225 226 227 228 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 222 def to_hash { :code => code.to_i, :message => .to_s, :data => data, } end |