Sha256: 262756fe9bd2015d9a2a4f7de296ec6422d567690b48b230eaa6bb35e07353e6
Contents?: true
Size: 799 Bytes
Versions: 32
Compression:
Stored size: 799 Bytes
Contents
require 'rbconfig' module Appjam ## # This method return the correct location of appjam bin or # exec it using Kernel#system with the given args # def self.bin(*args) @_appjam_bin ||= [self.ruby_command, File.expand_path("../../../bin/appjam", __FILE__)] args.empty? ? @_appjam_bin : system(args.unshift(@_appjam_bin).join(" ")) end ## # Return the path to the ruby interpreter taking into account multiple # installations and windows extensions. # def self.ruby_command @ruby_command ||= begin ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) ruby << Config::CONFIG['EXEEXT'] # escape string in case path to ruby executable contain spaces. ruby.sub!(/.*\s.*/m, '"\&"') ruby end end end # Appjam
Version data entries
32 entries across 32 versions & 1 rubygems