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.
70 71 72 73 74 75 76 |
# File 'lib/rio/ext.rb', line 70 def initialize(etest,mod) @inc = { 'cx' => mod+'::Cx', 'input' => mod+'::Input', 'output' => mod+'::Output', } end |
Instance Method Details
#add(obj, state) ⇒ Object
77 78 79 80 81 82 |
# File 'lib/rio/ext.rb', line 77 def add(obj,state) case state when 'Stream::Input' then obj.extend(@inc['input']) when 'Stream::Output' then obj.extend(@inc['output']) end end |