Class: PM::SinatraApp
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- PM::SinatraApp
- Includes:
- Singleton
- Defined in:
- lib/patchmaster/web/sinatra_app.rb
Instance Attribute Summary collapse
-
#pm ⇒ Object
readonly
Returns the value of attribute pm.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize ⇒ SinatraApp
constructor
A new instance of SinatraApp.
-
#refresh ⇒ Object
Public method callable by triggers.
- #run ⇒ Object
Constructor Details
#initialize ⇒ SinatraApp
Returns a new instance of SinatraApp.
112 113 114 |
# File 'lib/patchmaster/web/sinatra_app.rb', line 112 def initialize @pm = PM::PatchMaster.instance end |
Instance Attribute Details
#pm ⇒ Object (readonly)
Returns the value of attribute pm.
110 111 112 |
# File 'lib/patchmaster/web/sinatra_app.rb', line 110 def pm @pm end |
#port ⇒ Object
Returns the value of attribute port.
109 110 111 |
# File 'lib/patchmaster/web/sinatra_app.rb', line 109 def port @port end |
Instance Method Details
#refresh ⇒ Object
Public method callable by triggers
125 126 127 |
# File 'lib/patchmaster/web/sinatra_app.rb', line 125 def refresh # FIXME end |
#run ⇒ Object
116 117 118 119 120 121 122 |
# File 'lib/patchmaster/web/sinatra_app.rb', line 116 def run self.class.set(:port, @port) if @port @pm.start ensure @pm.stop @pm.close_debug_file end |