Class: RIO::Ext::Extension
Instance Method Summary collapse
- #add(obj, state) ⇒ Object
-
#initialize(etest, mod) ⇒ Extension
constructor
A new instance of Extension.
Constructor Details
#initialize(etest, mod) ⇒ Extension
Returns a new instance of Extension.
61 62 63 64 65 66 67 |
# File 'lib/rio/ext.rb', line 61 def initialize(etest,mod) @inc = { 'cx' => mod+'::Cx', 'input' => mod+'::Input', 'output' => mod+'::Output', } end |
Instance Method Details
#add(obj, state) ⇒ Object
68 69 70 71 72 73 |
# File 'lib/rio/ext.rb', line 68 def add(obj,state) case state when 'Stream::Input' then obj.extend(@inc['input']) when 'Stream::Output' then obj.extend(@inc['output']) end end |