Class: Rufus::Lua::Coroutine

(coming soon)

Constructor Summary

This class inherits a constructor from Rufus::Lua::Ref.

Public Visibility

Public Instance Method Summary

#resume(*args)

Resumes the coroutine.

#status

Returns the string status of the coroutine : suspended/running/dead/normal.

Public Instance Methods Inherited from Rufus::Lua::Ref

free

Public Instance Method Details

resume

public resume(*args)

Resumes the coroutine

[View source]


112
113
114
115
116
117
118
119
120
121
122
# File 'lib/rufus/lua/objects.rb', line 112

def resume (*args)

  bottom = stack_top

  fetch_library_method('coroutine.resume').load_onto_stack

  load_onto_stack
  args.each { |arg| stack_push(arg) }

  pcall(bottom, args.length + 1)
end

status

public status

Returns the string status of the coroutine : suspended/running/dead/normal

[View source]


127
128
129
130
131
132
133
134
135
# File 'lib/rufus/lua/objects.rb', line 127

def status

  bottom = stack_top

  fetch_library_method('coroutine.status').load_onto_stack
  load_onto_stack

  pcall(bottom, 1)
end
Generated on Wednesday, September 30 2009 at 01:27:08 PM by YARD 0.2.3.5 (ruby-1.8.7).