Exception: Bullring::JSError
- Inherits:
-
StandardError
- Object
- StandardError
- Bullring::JSError
- Defined in:
- lib/bullring/workers/common.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize(msg = nil) ⇒ JSError
constructor
A new instance of JSError.
Constructor Details
#initialize(msg = nil) ⇒ JSError
Returns a new instance of JSError.
6 7 8 9 10 11 12 |
# File 'lib/bullring/workers/common.rb', line 6 def initialize(msg = nil) if msg.instance_of?(Hash) @hash = msg msg = msg.to_s end super(msg) end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
22 23 24 |
# File 'lib/bullring/workers/common.rb', line 22 def hash @hash end |
Instance Method Details
#[](key) ⇒ Object
18 19 20 |
# File 'lib/bullring/workers/common.rb', line 18 def [](key) @hash[key] end |
#[]=(key, value) ⇒ Object
14 15 16 |
# File 'lib/bullring/workers/common.rb', line 14 def []=(key, value) @hash[key] = value end |