Class: Bookman::Config

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

Direct Known Subclasses

BeerConfig, FootballConfig, WorldConfig

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Config

Returns a new instance of Config.



7
8
9
10
11
12
13
14
# File 'lib/bookman/config.rb', line 7

def initialize( hash )
  @hash = hash

### add source_url  e.g. https://github.com ?? - why, why not???

  @build_dir  = hash[:build_dir] || './build'  ## note: defaults to ./build
  @setup      = hash[:setup]
end

Instance Method Details

#bookfile_dirObject

Bookfile – allow multiple (more than one) bookfiles - how? why, why not??? – local

todo: move bookfile_dir to unzip dir (e.g. move Bookfile into /book) - why, why not???



30
# File 'lib/bookman/config.rb', line 30

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

#bookfile_pathObject



31
# File 'lib/bookman/config.rb', line 31

def bookfile_path() "#{bookfile_dir}/Bookfile";  end

#build_dirObject



16
# File 'lib/bookman/config.rb', line 16

def build_dir()  @build_dir;   end

#datafile_dirObject

Datafile – local



22
# File 'lib/bookman/config.rb', line 22

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

#datafile_pathObject



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

def datafile_path() "#{datafile_dir}/Datafile";  end

#setupObject

e.g. at, franken, worldcup, etc.



17
# File 'lib/bookman/config.rb', line 17

def setup()      @setup;       end