Class: CWlogsIO::HandlerWrapper
- Inherits:
-
Object
- Object
- CWlogsIO::HandlerWrapper
show all
- Defined in:
- lib/cwlogs_io/handler.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of HandlerWrapper.
9
10
11
|
# File 'lib/cwlogs_io/handler.rb', line 9
def initialize(handler)
@handler = handler
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *params) ⇒ Object
24
25
26
|
# File 'lib/cwlogs_io/handler.rb', line 24
def method_missing(method, *params)
@handler.send(method, *params)
end
|
Class Method Details
.create(handler_class, *params) ⇒ Object
13
14
15
16
17
|
# File 'lib/cwlogs_io/handler.rb', line 13
def self.create(handler_class, *params)
handler = HandlerWrapper.new(handler_class.new(*params))
HandlerManager.instance.register(handler)
handler
end
|
Instance Method Details
#close ⇒ Object
19
20
21
22
|
# File 'lib/cwlogs_io/handler.rb', line 19
def close
@handler.close
HandlerManager.instance.deregister(self)
end
|
#respond_to_missing?(method, include_private = false) ⇒ Boolean
28
29
30
|
# File 'lib/cwlogs_io/handler.rb', line 28
def respond_to_missing?(method, include_private = false)
@handler.respond_to?(method, include_private)
end
|