Class: Green::Proxy

Inherits:
Object
  • Object
show all
Includes:
GreenMethods
Defined in:
lib/green.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GreenMethods

#[], #[]=, #kill, #locals, #schedule, #switch, #throw

Constructor Details

#initializeProxy

Returns a new instance of Proxy.



48
49
50
# File 'lib/green.rb', line 48

def initialize
  @f = Fiber.current
end

Instance Attribute Details

#fObject (readonly)

Returns the value of attribute f.



47
48
49
# File 'lib/green.rb', line 47

def f
  @f
end

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/green.rb', line 52

def alive?
  f.alive?
end