From d6f2f55b46ceddd986e7ba42fb8269aef0ca8e77 Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Fri, 21 Sep 2012 19:56:28 +0800 Subject: Add Support for Ruby Extensions, C Extensions and Test Integration --- mrbgems/g/mrblib_example/Makefile | 7 +++++++ mrbgems/g/mrblib_example/README.md | 4 ++++ mrbgems/g/mrblib_example/mrblib/mrblib_example.rb | 5 +++++ mrbgems/g/mrblib_example/test/mrblib_example.rb | 3 +++ 4 files changed, 19 insertions(+) create mode 100644 mrbgems/g/mrblib_example/Makefile create mode 100644 mrbgems/g/mrblib_example/README.md create mode 100644 mrbgems/g/mrblib_example/mrblib/mrblib_example.rb create mode 100644 mrbgems/g/mrblib_example/test/mrblib_example.rb (limited to 'mrbgems/g/mrblib_example') diff --git a/mrbgems/g/mrblib_example/Makefile b/mrbgems/g/mrblib_example/Makefile new file mode 100644 index 000000000..a43677842 --- /dev/null +++ b/mrbgems/g/mrblib_example/Makefile @@ -0,0 +1,7 @@ +include ../../Makefile4gem + +GEM := mrblib_example + +gem-all : + +gem-clean : diff --git a/mrbgems/g/mrblib_example/README.md b/mrbgems/g/mrblib_example/README.md new file mode 100644 index 000000000..42792567f --- /dev/null +++ b/mrbgems/g/mrblib_example/README.md @@ -0,0 +1,4 @@ +hello world +========= + +This is an example gem which implements just one method +HW.say+ in a C extension. diff --git a/mrbgems/g/mrblib_example/mrblib/mrblib_example.rb b/mrbgems/g/mrblib_example/mrblib/mrblib_example.rb new file mode 100644 index 000000000..444f32236 --- /dev/null +++ b/mrbgems/g/mrblib_example/mrblib/mrblib_example.rb @@ -0,0 +1,5 @@ +class MRBLib + def MRBLib.mrblib_method + puts "A Ruby Extension" + end +end diff --git a/mrbgems/g/mrblib_example/test/mrblib_example.rb b/mrbgems/g/mrblib_example/test/mrblib_example.rb new file mode 100644 index 000000000..40189ffdd --- /dev/null +++ b/mrbgems/g/mrblib_example/test/mrblib_example.rb @@ -0,0 +1,3 @@ +assert('MRBLib extension') do + MRBLib.respond_to? :mrblib_method +end -- cgit v1.2.3