Method: Erhu::App#initialize

Defined in:
lib/erhu/app.rb

#initialize(erhufile_path = nil) ⇒ App

Returns a new instance of App.



4
5
6
7
8
9
10
11
12
13
# File 'lib/erhu/app.rb', line 4

def initialize(erhufile_path=nil)
  @erhufile = erhufile_path || File.join(Dir.pwd, "ErhuFile")

  @erhu_path = File.join(Dir.pwd, ".erhu")
  unless Dir.exist?(@erhu_path)
    FileUtils.mkdir_p(@erhu_path)
    puts "Created #{@erhu_path}"
  end
  @database_path = File.join(@erhu_path, "database.yml")
end