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.



32
33
34
35
# File 'lib/utopia/shell.rb', line 32

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

Instance Method Details

#appObject



37
38
39
40
41
# File 'lib/utopia/shell.rb', line 37

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

#bindingObject



47
48
49
# File 'lib/utopia/shell.rb', line 47

def binding
	super
end

#to_sObject



43
44
45
# File 'lib/utopia/shell.rb', line 43

def to_s
	self.class.name
end