Class: RestAssured::AppSession
- Inherits:
-
Object
- Object
- RestAssured::AppSession
- Includes:
- Utils::DrbSniffer
- Defined in:
- lib/rest-assured/api/app_session.rb
Instance Method Summary collapse
- #alive? ⇒ Boolean
-
#initialize ⇒ AppSession
constructor
A new instance of AppSession.
- #method_missing(*args) ⇒ Object
Methods included from Utils::DrbSniffer
Constructor Details
#initialize ⇒ AppSession
Returns a new instance of AppSession.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rest-assured/api/app_session.rb', line 10 def initialize @child = if not running_in_spork? and Process.respond_to?(:fork) Utils::Subprocess.new do AppRunner.run! end else child = ChildProcess.build('rest-assured', *Config.to_cmdargs) child.io.inherit! child.start child end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
29 30 31 |
# File 'lib/rest-assured/api/app_session.rb', line 29 def method_missing(*args) @child.send(*args) end |
Instance Method Details
#alive? ⇒ Boolean
23 24 25 26 27 |
# File 'lib/rest-assured/api/app_session.rb', line 23 def alive? @child.alive? rescue Errno::ECHILD false end |