Class: Bookman::BeerConfig

Inherits:
Config
  • Object
show all
Defined in:
lib/bookman/beer.rb

Instance Method Summary collapse

Methods inherited from Config

#bookfile_dir, #bookfile_path, #build_dir, #datafile_dir, #datafile_path, #setup

Constructor Details

#initialize(hash) ⇒ BeerConfig

Returns a new instance of BeerConfig.



7
# File 'lib/bookman/beer.rb', line 7

def initialize( hash ) super; end

Instance Method Details

#book_templates_unzip_dirObject

Book Templates rename to book_dir ?? why, why not? - split zip into book_dir and book_templates_dir why? why not?



33
# File 'lib/bookman/beer.rb', line 33

def book_templates_unzip_dir()  "#{build_dir}/#{collection}/#{setup}/book";  end

#bookfile_urlObject

Bookfile – remote



14
15
16
17
18
# File 'lib/bookman/beer.rb', line 14

def bookfile_url()
  ## note: for now always return beer.rb
  ##   use setup/layout-specific bookfiles??   allow selection of package,how?? why,why not??
  "http://github.com/book-templates/bookfile/raw/master/beer.rb"
end

#collectionObject



9
# File 'lib/bookman/beer.rb', line 9

def collection() 'beer'; end

#create_db!Object



28
# File 'lib/bookman/beer.rb', line 28

def create_db!()  BeerDb.create_all;  end

#datafile_urlObject

Datafile – remote



23
# File 'lib/bookman/beer.rb', line 23

def datafile_url() "http://github.com/openbeer/datafile/raw/master/#{setup}.rb"; end

#db_pathObject

Database



27
# File 'lib/bookman/beer.rb', line 27

def db_path() "#{build_dir}/#{collection}/#{setup}/#{collection}.db"; end