Module: Biogem::Path

Included in:
Jeweler::Generator
Defined in:
lib/bio-gem/mod/biogem.rb

Instance Method Summary collapse

Instance Method Details

#bin_dirObject



47
48
49
# File 'lib/bio-gem/mod/biogem.rb', line 47

def bin_dir
  'bin'
end

#bin_nameObject



55
56
57
# File 'lib/bio-gem/mod/biogem.rb', line 55

def bin_name
  "#{original_project_name}"
end

#db_dirObject



43
44
45
# File 'lib/bio-gem/mod/biogem.rb', line 43

def db_dir
  'db'
end

#exists_dir?(dir) ⇒ Boolean

Returns:

  • (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_dirObject



51
52
53
# File 'lib/bio-gem/mod/biogem.rb', line 51

def ext_dir
  'ext'
end

#lib_dirObject



19
20
21
# File 'lib/bio-gem/mod/biogem.rb', line 19

def lib_dir
  'lib'
end

#lib_filenameObject



23
24
25
# File 'lib/bio-gem/mod/biogem.rb', line 23

def lib_filename
  "#{project_name}.rb"
end

#lib_plugin_dirObject



27
28
29
# File 'lib/bio-gem/mod/biogem.rb', line 27

def lib_plugin_dir
  path(lib_dir, project_name)
end

#lib_plugin_filenameObject



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_nameObject



35
36
37
# File 'lib/bio-gem/mod/biogem.rb', line 35

def require_name
  project_name
end

#short_nameObject



14
15
16
# File 'lib/bio-gem/mod/biogem.rb', line 14

def short_name
  original_project_name.sub(/^bio-/,'')
end

#test_data_dirObject



39
40
41
# File 'lib/bio-gem/mod/biogem.rb', line 39

def test_data_dir
  'test/data'
end