From 1a8f5613b2db66887ede225438fe50b870871cd5 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 23 Nov 2015 15:59:46 +0100 Subject: [PATCH] TMP Add Ruby example skeleton --- examples/basic.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/basic.rb diff --git a/examples/basic.rb b/examples/basic.rb new file mode 100644 index 0000000..1e38128 --- /dev/null +++ b/examples/basic.rb @@ -0,0 +1,22 @@ +require "gir_ffi" + +GirFFI.setup :SweGlib + +SweGlib.init + +timestamp = SweGlib::Timestamp.new +timestamp.set_gregorian_full(1983, 3, 7, 11, 54, 45, 0, 1) + +moment = SweGlib::Moment.new + +moment.set_timestamp(timestamp) +moment.set_coordinates(19.03991, 47.49801, 280) +moment.set_house_system :placidus +moment.add_all_planets + +all_planets = moment.get_all_planets() + +all_planets.each do |planet| + # TODO Why do I get numbers here, instead of GswePlanets? + print planet, "\n" +end