Class: Gocart::Environment

Inherits:
Base
  • Object
show all
Defined in:
lib/gocart/environment.rb

Instance Method Summary collapse

Methods inherited from Base

#app_name_valid?, #build_app_dir

Constructor Details

#initialize(root, app_name) ⇒ Environment

Returns a new instance of Environment.



8
9
10
11
12
13
14
15
16
# File 'lib/gocart/environment.rb', line 8

def initialize(root, app_name)
  @logger = Logger.new($stderr)
  @logger.level = Logger::FATAL

  @app_parent_path = Pathname(Dir.pwd.to_s)
  @app_base_path = @app_parent_path.join(app_name)
  @app_name = app_name
  @assets_path = Pathname(root).join('assets')
end