Module: VisualizeHelper
- Defined in:
- lib/visualize_helper/version.rb,
ext/visualize_helper/visualize_helper.c
Constant Summary collapse
- VERSION =
"0.0.10.27"
Class Method Summary collapse
-
.hello_world ⇒ Object
Hello World without parameters.
-
.min_max_period(min, max, hash, intervals, aggr) ⇒ Object
Return: [ min, max, period].
-
.test(param) ⇒ Object
Register the method for development testing.
Class Method Details
.hello_world ⇒ Object
Hello World without parameters
4 5 6 7 |
# File 'ext/visualize_helper/visualize_helper.c', line 4 static VALUE hello_world() { return rb_str_new_cstr("hello world"); } |
.min_max_period(min, max, hash, intervals, aggr) ⇒ Object
Return: [ min, max, period]
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'ext/visualize_helper/visualize_helper.c', line 88 static VALUE min_max_period(VALUE self, VALUE min, VALUE max, VALUE hash, VALUE intervals, VALUE aggr) { int period = Qnil; // Create Ruby array that will be the result VALUE array = rb_ary_new(); // Push initial values of the result rb_ary_push(array,min); rb_ary_push(array,max); rb_ary_push(array,period); rb_ary_push(array,intervals); rb_ary_push(array,aggr); // iterate on hash calling "encontra_min_max_period" for each rb_hash_foreach(hash,encontra_min_max_period,array); // Return results return array; } |
.test(param) ⇒ Object
Register the method for development testing
112 113 114 115 116 |
# File 'ext/visualize_helper/visualize_helper.c', line 112 static VALUE test(VALUE self, VALUE param){ int a = INT2FIX(param); return FIX2INT(a); } |