Class: Webroar::Dependency
- Inherits:
-
Object
- Object
- Webroar::Dependency
- Defined in:
- lib/dependencies.rb
Instance Method Summary collapse
- #find(options) ⇒ Object
-
#initialize(name) ⇒ Dependency
constructor
A new instance of Dependency.
- #name ⇒ Object
Constructor Details
#initialize(name) ⇒ Dependency
Returns a new instance of Dependency.
23 24 25 26 |
# File 'lib/dependencies.rb', line 23 def initialize(name) @name = name @options = nil end |
Instance Method Details
#find(options) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/dependencies.rb', line 32 def find() @options = case (@name) when File.basename(Config::CONFIG['CC']), "make", Config::CONFIG['RUBY_INSTALL_NAME'], "starling"; flag = find_command when "libsqlite3.so"; flag = find_lib when "sqlite3.h", "gnutls/gnutls.h", "zlib.h", "regex.h"; flag = find_header_file when "ruby_headers"; flag = find_header_file("ruby.h") when Config::CONFIG['LIBRUBY']; flag = find_ruby_lib when "rubygems"; flag = find_gem when "openssl-ruby"; flag = find_gem("openssl") when "zlib-ruby"; flag = find_gem("zlib") when "Xcode.app"; flag = find_xcode else flag = "\e[31mUnknown dependency\e[0m." end return flag end |
#name ⇒ Object
28 29 30 |
# File 'lib/dependencies.rb', line 28 def name @name end |