Class: Bio::Ucsc::Library

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/ucsc/library.rb

Overview

Cross-platform library naming

Class Method Summary collapse

Class Method Details

.filenameObject

return the platform specific library name



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/bio/ucsc/library.rb', line 18

def self.filename
  lib_os = case RUBY_PLATFORM
  when /linux/
    'so.1'
  when /darwin/
    '1.dylib'
  else
    case RUBY_DESCRIPTION
    when /darwin.*java/
      '1.dylib'
    when /linux.*java/
    'so.1'
    else raise NotImplementedError, "UcscUtil not supported on your platform"
    end
  end

  File.join(File.expand_path(File.dirname(__FILE__)),"src/libucsc.#{lib_os}")
end