Class: Bookman::Config
- Inherits:
-
Object
- Object
- Bookman::Config
- Defined in:
- lib/bookman/config.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#bookfile_dir ⇒ Object
Bookfile – allow multiple (more than one) bookfiles - how? why, why not??? – local.
- #bookfile_path ⇒ Object
- #build_dir ⇒ Object
-
#datafile_dir ⇒ Object
Datafile – local.
- #datafile_path ⇒ Object
-
#initialize(hash) ⇒ Config
constructor
A new instance of Config.
-
#setup ⇒ Object
e.g.
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_dir ⇒ Object
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_path ⇒ Object
31 |
# File 'lib/bookman/config.rb', line 31 def bookfile_path() "#{bookfile_dir}/Bookfile"; end |
#build_dir ⇒ Object
16 |
# File 'lib/bookman/config.rb', line 16 def build_dir() @build_dir; end |
#datafile_dir ⇒ Object
Datafile – local
22 |
# File 'lib/bookman/config.rb', line 22 def datafile_dir() "#{build_dir}/#{collection}/#{setup}"; end |
#datafile_path ⇒ Object
23 |
# File 'lib/bookman/config.rb', line 23 def datafile_path() "#{datafile_dir}/Datafile"; end |
#setup ⇒ Object
e.g. at, franken, worldcup, etc.
17 |
# File 'lib/bookman/config.rb', line 17 def setup() @setup; end |