Exception: Bullring::JSError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/bullring/workers/common.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hashObject (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