Class: Serif::DevelopmentServer
- Inherits:
-
Object
- Object
- Serif::DevelopmentServer
- Defined in:
- lib/serif/server.rb
Defined Under Namespace
Classes: DevApp
Instance Attribute Summary collapse
-
#source_directory ⇒ Object
readonly
Returns the value of attribute source_directory.
Instance Method Summary collapse
-
#initialize(source_directory) ⇒ DevelopmentServer
constructor
A new instance of DevelopmentServer.
- #start ⇒ Object
Constructor Details
#initialize(source_directory) ⇒ DevelopmentServer
32 33 34 |
# File 'lib/serif/server.rb', line 32 def initialize(source_directory) @source_directory = source_directory end |
Instance Attribute Details
#source_directory ⇒ Object (readonly)
Returns the value of attribute source_directory.
30 31 32 |
# File 'lib/serif/server.rb', line 30 def source_directory @source_directory end |
Instance Method Details
#start ⇒ Object
36 37 38 39 40 |
# File 'lib/serif/server.rb', line 36 def start FileUtils.cd @source_directory app = Sinatra.new(DevApp) app.run!(:port => 8000) end |