Created
January 11, 2012 10:19
-
-
Save gouthamvel/1594033 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# template for | |
class ForkedProcess | |
def initialize *args | |
end | |
def receive_data data | |
#EM.popen form_cmd, ForkedProcess | |
end | |
def receive_stderr data | |
end | |
def unbind | |
end | |
end | |
class Foo | |
def process | |
EM.run do | |
EM.popen form_cmd, ForkedProcess | |
end | |
end | |
def form_cmd | |
'ls -lth' | |
end | |
end | |
foo = Foo.new | |
foo.process |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment