Module: Babushka::Path

Defined in:
lib/babushka.rb

Class Method Summary collapse

Class Method Details

.binObject


13
# File 'lib/babushka.rb', line 13

def self.bin() File.dirname(binary) end

.binaryObject


12
# File 'lib/babushka.rb', line 12

def self.binary() File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ end

.libObject


15
# File 'lib/babushka.rb', line 15

def self.lib() File.join(path, 'lib') end

.pathObject


14
# File 'lib/babushka.rb', line 14

def self.path() File.dirname(bin) end

.run_from_path?Boolean

Returns:

  • (Boolean)

16
# File 'lib/babushka.rb', line 16

def self.run_from_path?() ENV['PATH'].split(':').include?(File.dirname($0)) end