VERSION | = | Version.to_s |
VERSION | = | Version.to_s |
# File lib/htauth.rb, line 20 20: def self.lib_path( *args ) 21: self.sub_path( "lib", *args ) 22: end
# File lib/htauth.rb, line 20 20: def self.lib_path( *args ) 21: self.sub_path( "lib", *args ) 22: end
The root directory of the project is considered to be the parent directory of the ‘lib’ directory.
# File lib/htauth.rb, line 11 11: def self.root_dir 12: unless @root_dir 13: path_parts = ::File.expand_path( __FILE__ ).split( ::File::SEPARATOR ) 14: lib_index = path_parts.rindex( 'lib' ) 15: @root_dir = path_parts[ 0...lib_index].join( ::File::SEPARATOR ) + ::File::SEPARATOR 16: end 17: return @root_dir 18: end
The root directory of the project is considered to be the parent directory of the ‘lib’ directory.
# File lib/htauth.rb, line 11 11: def self.root_dir 12: unless @root_dir 13: path_parts = ::File.expand_path( __FILE__ ).split( ::File::SEPARATOR ) 14: lib_index = path_parts.rindex( 'lib' ) 15: @root_dir = path_parts[ 0...lib_index].join( ::File::SEPARATOR ) + ::File::SEPARATOR 16: end 17: return @root_dir 18: end
# File lib/htauth.rb, line 24 24: def self.sub_path( sub, *args ) 25: sp = ::File.join( root_dir, sub ) + ::File::SEPARATOR 26: sp = ::File.join( sp, *args ) if args 27: end