Module: ThreeScale::Backend::Util

Defined in:
lib/3scale/backend/util.rb

Class Method Summary collapse

Class Method Details

.number_of_cpusObject



7
8
9
# File 'lib/3scale/backend/util.rb', line 7

def self.number_of_cpus
  Etc.nprocessors
end

.root_dirObject



11
12
13
14
# File 'lib/3scale/backend/util.rb', line 11

def self.root_dir
  File.expand_path(File.join(Array.new(4, '..'.freeze)),
                   Pathname.new(__FILE__).realpath)
end