Class: Nervion::CallbackTable

Inherits:
Object
  • Object
show all
Defined in:
lib/nervion/callback_table.rb

Instance Method Summary collapse

Constructor Details

#initializeCallbackTable

Returns a new instance of CallbackTable.



4
5
6
7
8
9
# File 'lib/nervion/callback_table.rb', line 4

def initialize
  @callbacks = {
    http_error: http_error_callback,
    network_error: empty_callback
  }
end

Instance Method Details

#[](name) ⇒ Object



15
16
17
# File 'lib/nervion/callback_table.rb', line 15

def [](name)
  @callbacks[name]
end

#[]=(name, code) ⇒ Object



11
12
13
# File 'lib/nervion/callback_table.rb', line 11

def []=(name, code)
  @callbacks[name] = code
end