Class: 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
Constants inherited from Object
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#data ⇒ Object
Returns the value of attribute data.
-
#message ⇒ Object
Returns the value of attribute message.
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
#code ⇒ Object
Returns the value of attribute code.
216 217 218 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 216 def code @code end |
#data ⇒ Object
Returns the value of attribute data.
218 219 220 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 218 def data @data end |
#message ⇒ Object
Returns the value of attribute message.
217 218 219 |
# File 'lib/rack/rpc/endpoint/jsonrpc.rb', line 217 def @message end |
Instance Method Details
#to_hash ⇒ 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 |