Exception: Electrb::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Electrb::Error
- Defined in:
- lib/electrb.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#jsonrpc ⇒ Object
Returns the value of attribute jsonrpc.
Class Method Summary collapse
-
.from(hash) ⇒ Electrb::Error
generate error form hash.
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/electrb.rb', line 8 def id @id end |
#jsonrpc ⇒ Object
Returns the value of attribute jsonrpc.
9 10 11 |
# File 'lib/electrb.rb', line 9 def jsonrpc @jsonrpc end |
Class Method Details
.from(hash) ⇒ Electrb::Error
generate error form hash.
14 15 16 17 18 19 |
# File 'lib/electrb.rb', line 14 def self.from(hash) e = Electrb::Error.new(hash['error']) e.id = hash['id'] e.jsonrpc = hash['jsonrpc'] e end |