Skip to content

Commit fa54898

Browse files
committed
created some test ruby libraries
1 parent 6279d2f commit fa54898

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

library/dummy/dummy.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class Dummy
2+
def initialize
3+
puts 'ok'
4+
end
5+
end

test/sketches/installed_ruby.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
load_library :dummy # Dummy is for testing installed ruby library loading
2+
13
def settings
24
size 200, 200
35
end
46

57
def setup
68
sketch_title 'Installed Ruby'
7-
puts 'ok'
9+
Dummy.new
810
end
911

1012
def draw
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class RubyLibrary
2+
def initialize
3+
puts 'ok'
4+
end
5+
end

test/sketches/local_ruby.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
load_library :ruby_library
2+
13
def settings
24
size 200, 200
35
end
46

57
def setup
68
sketch_title 'Local Ruby'
7-
puts 'ok'
9+
RubyLibrary.new
810
end
911

1012
def draw

0 commit comments

Comments
 (0)