Module: LightIO::Wrap::Wrapper
- Included in:
- Library::Addrinfo, Library::Socket::Ifaddr, Library::ThreadGroup, IOWrapper
- Defined in:
- lib/lightio/wrap.rb
Overview
wrapper for normal ruby objects
Defined Under Namespace
Modules: ClassMethods, SingletonClassCommonMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(io = nil) ⇒ Object
wrap raw ruby objects.
- #method_missing(method, *args) ⇒ Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
14 15 16 |
# File 'lib/lightio/wrap.rb', line 14 def method_missing(method, *args) @io.public_send(method, *args) end |
Class Method Details
.included(base) ⇒ Object
65 66 67 68 |
# File 'lib/lightio/wrap.rb', line 65 def included(base) base.send :extend, ClassMethods base.singleton_class.send :extend, SingletonClassCommonMethods end |
Instance Method Details
#initialize(io = nil) ⇒ Object
wrap raw ruby objects
10 11 12 |
# File 'lib/lightio/wrap.rb', line 10 def initialize(io=nil) @io ||= io end |