From aecb756b33510378d91d9737930d97a381cc9403 Mon Sep 17 00:00:00 2001 From: Tom Black Date: Fri, 28 Sep 2018 13:23:43 -0700 Subject: Style, docs, and consistency --- lib/ruby2d/renderable.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/ruby2d/renderable.rb b/lib/ruby2d/renderable.rb index 18c7a78..0e5da50 100644 --- a/lib/ruby2d/renderable.rb +++ b/lib/ruby2d/renderable.rb @@ -5,18 +5,21 @@ module Ruby2D attr_reader :z + # Set the z position (depth) of the object def z=(z) remove @z = z add end + # Add the object to the window def add if Module.const_defined? :DSL Window.add(self) end end + # Remove the object from the window def remove if Module.const_defined? :DSL Window.remove(self) -- cgit v1.2.3