Class: Barrage::Generators::Pid

Inherits:
Base
  • Object
show all
Defined in:
lib/barrage/generators/pid.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#initialize, #length

Constructor Details

This class inherits a constructor from Barrage::Generators::Base

Instance Method Details

#generateObject Also known as: current



6
7
8
# File 'lib/barrage/generators/pid.rb', line 6

def generate
  Process.pid & (2 ** length-1)
end