Class: Utopia::Shell

Inherits:
Object
  • Object
show all
Includes:
Rack::Test::Methods
Defined in:
lib/utopia/shell.rb

Overview

This is designed to be used with the corresponding bake task.

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Shell

Returns a new instance of Shell.



15
16
17
18
# File 'lib/utopia/shell.rb', line 15

def initialize(context)
  @context = context
  @app = nil
end

Instance Method Details

#appObject



20
21
22
23
24
# File 'lib/utopia/shell.rb', line 20

def app
  @app ||= Rack::Builder.parse_file(
    File.expand_path("config.ru", @context.root)
  ).first
end

#bindingObject



30
31
32
# File 'lib/utopia/shell.rb', line 30

def binding
  super
end

#to_sObject



26
27
28
# File 'lib/utopia/shell.rb', line 26

def to_s
  self.class.name
end