Module: Tux
- Defined in:
- lib/tux/runner.rb,
lib/tux/version.rb,
lib/tux/commands.rb,
lib/tux.rb
Defined Under Namespace
Modules: Commands, CommandsFormatted Classes: Runner
Constant Summary collapse
- VERSION =
'0.3.0'
Class Method Summary collapse
Class Method Details
.app_class ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/tux.rb', line 7 def self.app_class @app_class ||= begin klasses = objects(Class).select {|e| e.superclass == Sinatra::Base } raise "No Sinatra application found" if klasses.empty? klasses.size == 1 ? klasses[0] : (klasses - [Sinatra::Application])[0] end end |