aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2008-11-02 23:20:44 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2008-11-02 23:48:55 +0000
commit5dcb7428bed9f47e3a80f9b4370275673be036b9 (patch)
treeb7a7a2185ac02092b9e98769d5e55bd53271cee2
parentb97990bd52bcbe0571f11e959fca6d66a96469b4 (diff)
downloadpaludis-5dcb7428bed9f47e3a80f9b4370275673be036b9.tar.gz
paludis-5dcb7428bed9f47e3a80f9b4370275673be036b9.tar.xz
RDOC_IS_STUPID
-rw-r--r--ruby/selection.cc80
-rw-r--r--ruby/version_spec.cc26
2 files changed, 93 insertions, 13 deletions
diff --git a/ruby/selection.cc b/ruby/selection.cc
index 2e5c0a0..b436a0c 100644
--- a/ruby/selection.cc
+++ b/ruby/selection.cc
@@ -63,6 +63,70 @@ namespace
}
};
+ /*
+ * call-seq:
+ * to_s -> String
+ *
+ * Return as String
+ */
+ FAKE_RDOC_METHOD(selection_to_s);
+
+ /*
+ * call-seq:
+ * new(FilteredGenerator) -> SomeArbitraryVersion
+ *
+ * Create new SomeArbitrartyVersion Selection
+ */
+ FAKE_RDOC_METHOD(some_arbitrary_version_new);
+
+ /*
+ * call-seq:
+ * new(FilteredGenerator) -> BestVersionOnly
+ *
+ * Create new BestVersionOnly Selection
+ */
+ FAKE_RDOC_METHOD(best_version_only_new);
+
+ /*
+ * call-seq:
+ * new(FilteredGenerator) -> BestVersionInEachSlot
+ *
+ * Create new BestVersionOnly Selection
+ */
+ FAKE_RDOC_METHOD(best_version_in_each_slot_new);
+
+ /*
+ * call-seq:
+ * new(FilteredGenerator) -> AllVersionsSorted
+ *
+ * Create new AllVersionsSorted Selection
+ */
+ FAKE_RDOC_METHOD(all_versions_sorted_new);
+
+ /*
+ * call-seq:
+ * new(FilteredGenerator) -> AllVersionsGroupedBySlot
+ *
+ * Create new AllVersionsGroupedBySlot Selection
+ */
+ FAKE_RDOC_METHOD(all_versions_sorted_new);
+
+ /*
+ * call-seq:
+ * new(FilteredGenerator) -> AllVersionsUnsorted
+ *
+ * Create new AllVersionsUnsorted Selection
+ */
+ FAKE_RDOC_METHOD(all_versions_sorted_new);
+
+ /*
+ * call-seq:
+ * new(FilteredGenerator) -> RequireExactlyOne
+ *
+ * Create new RequireExactlyOne Selection
+ */
+ FAKE_RDOC_METHOD(all_versions_sorted_new);
+
void do_register_selection()
{
/*
@@ -81,7 +145,7 @@ namespace
c_selection = rb_define_class_under(c_selection_module, "Selection", rb_cObject);
rb_funcall(c_selection, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_method(c_selection, "initialize", RUBY_FUNC_CAST(&selection_init), -1);
- rb_define_method(c_selection, "to_s", RUBY_FUNC_CAST(&Common<Selection>::to_s), 0);
+ rb_define_method(c_selection, "to_s", RDOC_IS_STUPID(selection_to_s,&Common<Selection>::to_s), 0);
/*
* Document-class: Paludis::Selection::SomeArbitraryVersion
@@ -90,7 +154,7 @@ namespace
*/
c_selection_some_arbitrary_version = rb_define_class_under(c_selection_module, "SomeArbitraryVersion", c_selection);
rb_define_singleton_method(c_selection_some_arbitrary_version, "new",
- RUBY_FUNC_CAST(&SelectionNew<selection::SomeArbitraryVersion>::selection_new), 1);
+ RDOC_IS_STUPID(some_arbitrary_version_new, &SelectionNew<selection::SomeArbitraryVersion>::selection_new), 1);
/*
* Document-class: Paludis::Selection::BestVersionOnly
@@ -99,7 +163,7 @@ namespace
*/
c_selection_best_version_only = rb_define_class_under(c_selection_module, "BestVersionOnly", c_selection);
rb_define_singleton_method(c_selection_best_version_only, "new",
- RUBY_FUNC_CAST(&SelectionNew<selection::BestVersionOnly>::selection_new), 1);
+ RDOC_IS_STUPID(best_version_only_new, &SelectionNew<selection::BestVersionOnly>::selection_new), 1);
/*
* Document-class: Paludis::Selection::BestVersionInEachSlot
@@ -108,7 +172,7 @@ namespace
*/
c_selection_best_version_in_each_slot = rb_define_class_under(c_selection_module, "BestVersionInEachSlot", c_selection);
rb_define_singleton_method(c_selection_best_version_in_each_slot, "new",
- RUBY_FUNC_CAST(&SelectionNew<selection::BestVersionInEachSlot>::selection_new), 1);
+ RDOC_IS_STUPID(best_version_in_each_slot_new, &SelectionNew<selection::BestVersionInEachSlot>::selection_new), 1);
/*
* Document-class: Paludis::Selection::AllVersionsSorted
@@ -117,7 +181,7 @@ namespace
*/
c_selection_all_versions_sorted = rb_define_class_under(c_selection_module, "AllVersionsSorted", c_selection);
rb_define_singleton_method(c_selection_all_versions_sorted, "new",
- RUBY_FUNC_CAST(&SelectionNew<selection::AllVersionsSorted>::selection_new), 1);
+ RDOC_IS_STUPID(all_versions_sorted_new, &SelectionNew<selection::AllVersionsSorted>::selection_new), 1);
/*
* Document-class: Paludis::Selection::AllVersionsGroupedBySlot
@@ -126,7 +190,7 @@ namespace
*/
c_selection_all_versions_grouped_by_slot = rb_define_class_under(c_selection_module, "AllVersionsGroupedBySlot", c_selection);
rb_define_singleton_method(c_selection_all_versions_grouped_by_slot, "new",
- RUBY_FUNC_CAST(&SelectionNew<selection::AllVersionsGroupedBySlot>::selection_new), 1);
+ RDOC_IS_STUPID(all_versions_grouped_by_slot, &SelectionNew<selection::AllVersionsGroupedBySlot>::selection_new), 1);
/*
* Document-class: Paludis::Selection::AllVersionsUnsorted
@@ -135,7 +199,7 @@ namespace
*/
c_selection_all_versions_unsorted = rb_define_class_under(c_selection_module, "AllVersionsUnsorted", c_selection);
rb_define_singleton_method(c_selection_all_versions_unsorted, "new",
- RUBY_FUNC_CAST(&SelectionNew<selection::AllVersionsUnsorted>::selection_new), 1);
+ RDOC_IS_STUPID(all_versions_unsorted_new, &SelectionNew<selection::AllVersionsUnsorted>::selection_new), 1);
/*
* Document-class: Paludis::Selection::RequireExactlyOne
@@ -144,7 +208,7 @@ namespace
*/
c_selection_require_exactly_one = rb_define_class_under(c_selection_module, "RequireExactlyOne", c_selection);
rb_define_singleton_method(c_selection_require_exactly_one, "new",
- RUBY_FUNC_CAST(&SelectionNew<selection::RequireExactlyOne>::selection_new), 1);
+ RDOC_IS_STUPID(require_exactly_one_new, &SelectionNew<selection::RequireExactlyOne>::selection_new), 1);
}
}
diff --git a/ruby/version_spec.cc b/ruby/version_spec.cc
index 9bd731c..e6ac453 100644
--- a/ruby/version_spec.cc
+++ b/ruby/version_spec.cc
@@ -142,6 +142,22 @@ namespace
return value_to_version_spec(self).has_try_part() ? Qtrue : Qfalse;
}
+ /*
+ * call-seq:
+ * to_s -> String
+ *
+ * Return as String
+ */
+ FAKE_RDOC_METHOD(version_spec_to_s);
+
+ /*
+ * call-seq:
+ * <=>(VersionSpec) -> -1, 0, +1
+ *
+ * Comparison—Returns -1, 0, or +1 depending on whether provided VersionSpec is less than, equal to, or greater than this VersionSpec. This is the basis for the tests in Comparable.
+ */
+ FAKE_RDOC_METHOD(version_spec_compare);
+
void do_register_version_spec()
{
/*
@@ -153,15 +169,15 @@ namespace
c_version_spec = rb_define_class_under(paludis_module(), "VersionSpec", rb_cObject);
rb_define_singleton_method(c_version_spec, "new", RUBY_FUNC_CAST(&version_spec_new), 1);
rb_define_method(c_version_spec, "initialize", RUBY_FUNC_CAST(&version_spec_init), 1);
- rb_define_method(c_version_spec, "<=>", RUBY_FUNC_CAST(&Common<VersionSpec>::compare), 1);
+ rb_define_method(c_version_spec, "<=>", RDOC_IS_STUPID(version_spec_compare,(&Common<VersionSpec>::compare)), 1);
rb_include_module(c_version_spec, rb_mComparable);
- rb_define_method(c_version_spec, "to_s", RUBY_FUNC_CAST(&Common<VersionSpec>::to_s), 0);
- rb_define_method(c_version_spec, "remove_revision", RUBY_FUNC_CAST(&version_spec_remove_revision), 0);
- rb_define_method(c_version_spec, "revision_only", RUBY_FUNC_CAST(&version_spec_revision_only), 0);
rb_define_method(c_version_spec, "bump", RUBY_FUNC_CAST(&version_spec_bump), 0);
rb_define_method(c_version_spec, "is_scm?", RUBY_FUNC_CAST(&version_spec_is_scm), 0);
- rb_define_method(c_version_spec, "has_try_part?", RUBY_FUNC_CAST(&version_spec_has_try_part), 0);
rb_define_method(c_version_spec, "has_scm_part?", RUBY_FUNC_CAST(&version_spec_has_scm_part), 0);
+ rb_define_method(c_version_spec, "has_try_part?", RUBY_FUNC_CAST(&version_spec_has_try_part), 0);
+ rb_define_method(c_version_spec, "remove_revision", RUBY_FUNC_CAST(&version_spec_remove_revision), 0);
+ rb_define_method(c_version_spec, "revision_only", RUBY_FUNC_CAST(&version_spec_revision_only), 0);
+ rb_define_method(c_version_spec, "to_s", RDOC_IS_STUPID(version_spec_to_s,(&Common<VersionSpec>::to_s)), 0);
}
}