Module: Ruby2D::DSL
- Defined in:
- lib/ruby2d/dsl.rb
Overview
dsl.rb
Instance Method Summary collapse
- #clear ⇒ Object
- #get(sym) ⇒ Object
- #hello ⇒ Object
- #on(mouse: nil, key: nil, key_down: nil, controller: nil, &proc) ⇒ Object
- #set(opts) ⇒ Object
- #show ⇒ Object
- #update(&proc) ⇒ Object
Instance Method Details
#clear ⇒ Object
28 29 30 |
# File 'lib/ruby2d/dsl.rb', line 28 def clear Ruby2D::Application.clear end |
#get(sym) ⇒ Object
8 9 10 |
# File 'lib/ruby2d/dsl.rb', line 8 def get(sym) Ruby2D::Application.get(sym) end |
#hello ⇒ Object
4 5 6 |
# File 'lib/ruby2d/dsl.rb', line 4 def hello puts "hi" end |
#on(mouse: nil, key: nil, key_down: nil, controller: nil, &proc) ⇒ Object
16 17 18 |
# File 'lib/ruby2d/dsl.rb', line 16 def on(mouse: nil, key: nil, key_down: nil, controller: nil, &proc) Ruby2D::Application.on(mouse: mouse, key: key, key_down: key_down, controller: controller, &proc) end |
#set(opts) ⇒ Object
12 13 14 |
# File 'lib/ruby2d/dsl.rb', line 12 def set(opts) Ruby2D::Application.set(opts) end |
#show ⇒ Object
24 25 26 |
# File 'lib/ruby2d/dsl.rb', line 24 def show Ruby2D::Application.show end |
#update(&proc) ⇒ Object
20 21 22 |
# File 'lib/ruby2d/dsl.rb', line 20 def update(&proc) Ruby2D::Application.update(&proc) end |