Module: Cheatr::Server
- Defined in:
- lib/cheatr/server.rb,
lib/cheatr/server/app.rb,
lib/cheatr/server/sheet.rb,
lib/cheatr/server/helpers.rb
Defined Under Namespace
Modules: Helpers
Classes: App, Sheet
Constant Summary
collapse
- @@config =
{}
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
18
19
20
|
# File 'lib/cheatr/server.rb', line 18
def self.config
@@config
end
|
.run(repository, opts = {}) ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'lib/cheatr/server.rb', line 7
def self.run(repository, opts = {})
@@config = @@config.merge(opts.to_hash)
Sheet.repository = File.expand_path(repository)
puts "Serving cheatr repository at #{Sheet.repository}"
App.run!
rescue Cheatr::Error => e
puts "Error: #{e.message}"
end
|