Module: Biogem::Path
- Included in:
- Jeweler::Generator
- Defined in:
- lib/bio-gem/mod/biogem.rb
Instance Method Summary collapse
- #bin_dir ⇒ Object
- #bin_name ⇒ Object
- #db_dir ⇒ Object
- #exists_dir?(dir) ⇒ Boolean
- #ext_dir ⇒ Object
- #lib_dir ⇒ Object
- #lib_filename ⇒ Object
- #lib_plugin_dir ⇒ Object
- #lib_plugin_filename ⇒ Object
- #path(*items) ⇒ Object
- #require_name ⇒ Object
- #short_name ⇒ Object
- #test_data_dir ⇒ Object
Instance Method Details
#bin_dir ⇒ Object
47 48 49 |
# File 'lib/bio-gem/mod/biogem.rb', line 47 def bin_dir 'bin' end |
#bin_name ⇒ Object
55 56 57 |
# File 'lib/bio-gem/mod/biogem.rb', line 55 def bin_name "#{original_project_name}" end |
#db_dir ⇒ Object
43 44 45 |
# File 'lib/bio-gem/mod/biogem.rb', line 43 def db_dir 'db' end |
#exists_dir?(dir) ⇒ Boolean
10 11 12 |
# File 'lib/bio-gem/mod/biogem.rb', line 10 def exists_dir?(dir) Dir.exists?(path(target_dir,dir)) end |
#ext_dir ⇒ Object
51 52 53 |
# File 'lib/bio-gem/mod/biogem.rb', line 51 def ext_dir 'ext' end |
#lib_dir ⇒ Object
19 20 21 |
# File 'lib/bio-gem/mod/biogem.rb', line 19 def lib_dir 'lib' end |
#lib_filename ⇒ Object
23 24 25 |
# File 'lib/bio-gem/mod/biogem.rb', line 23 def lib_filename "#{project_name}.rb" end |
#lib_plugin_dir ⇒ Object
27 28 29 |
# File 'lib/bio-gem/mod/biogem.rb', line 27 def lib_plugin_dir path(lib_dir, project_name) end |
#lib_plugin_filename ⇒ Object
31 32 33 |
# File 'lib/bio-gem/mod/biogem.rb', line 31 def lib_plugin_filename short_name + ".rb" end |
#path(*items) ⇒ Object
6 7 8 |
# File 'lib/bio-gem/mod/biogem.rb', line 6 def path(*items) File.join(*items).gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR) end |
#require_name ⇒ Object
35 36 37 |
# File 'lib/bio-gem/mod/biogem.rb', line 35 def require_name project_name end |
#short_name ⇒ Object
14 15 16 |
# File 'lib/bio-gem/mod/biogem.rb', line 14 def short_name original_project_name.sub(/^bio-/,'') end |
#test_data_dir ⇒ Object
39 40 41 |
# File 'lib/bio-gem/mod/biogem.rb', line 39 def test_data_dir 'test/data' end |