Class: Fiber

Inherits:
Object
  • Object
show all
Defined in:
lib/fiber_fun.rb

Constant Summary collapse

ROOT_FIBER =
Fiber.current

Instance Method Summary collapse

Instance Method Details

#current?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/fiber_fun.rb', line 11

def current?
  self == Fiber.current
end

#root?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/fiber_fun.rb', line 7

def root?
  self == ROOT_FIBER
end