Class: DL::CompositeHandler
- Inherits:
-
Object
- Object
- DL::CompositeHandler
- Defined in:
- lib/dl/import.rb
Instance Method Summary collapse
- #[](symbol) ⇒ Object
- #handlers ⇒ Object
-
#initialize(handlers) ⇒ CompositeHandler
constructor
A new instance of CompositeHandler.
- #sym(symbol) ⇒ Object
Constructor Details
#initialize(handlers) ⇒ CompositeHandler
Returns a new instance of CompositeHandler.
8 9 10 |
# File 'lib/dl/import.rb', line 8 def initialize(handlers) @handlers = handlers end |
Instance Method Details
#[](symbol) ⇒ Object
29 30 31 |
# File 'lib/dl/import.rb', line 29 def [](symbol) sym(symbol) end |
#handlers ⇒ Object
12 13 14 |
# File 'lib/dl/import.rb', line 12 def handlers() @handlers end |
#sym(symbol) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/dl/import.rb', line 16 def sym(symbol) @handlers.each{|handle| if( handle ) begin addr = handle.sym(symbol) return addr rescue DLError end end } return nil end |