class Paludis::DependenciesLabel

Dependencies label base class.

Public Instance Methods

text → String click to toggle source

Our text.

VALUE
    dependencies_label_text(VALUE self)
    {
        std::shared_ptr<const DependenciesLabel> * ptr;
        Data_Get_Struct(self, std::shared_ptr<const DependenciesLabel>, ptr);
        return rb_str_new2((*ptr)->text().c_str());
    }

    void do_register_dep_label()
    {
        /*
         * Document-class: Paludis::URILabel
         *
         * URI label base class.
         */
        c_uri_label = rb_define_class_under(c_paludis_module, "URILabel", rb_cObject);
        rb_funcall(c_uri_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
        rb_define_method(c_uri_label, "text", uri_label_text, 0);
        rb_define_method(c_uri_label, "to_s", uri_label_text, 0);

        c_uri_mirrors_then_listed_label = rb_define_class_under(c_paludis_module, "URIMirrorsThenListedLabel", c_uri_label);
        c_uri_mirrors_only_label = rb_define_class_under(c_paludis_module, "URIMirrorsOnlyLabel", c_uri_label);
        c_uri_listed_only_label = rb_define_class_under(c_paludis_module, "URIListedOnlyLabel", c_uri_label);
        c_uri_listed_then_mirrors_label = rb_define_class_under(c_paludis_module, "URIListedThenMirrorsLabel", c_uri_label);
        c_uri_local_mirrors_only_label = rb_define_class_under(c_paludis_module, "URILocalMirrorsOnlyLabel", c_uri_label);
        c_uri_manual_only_label = rb_define_class_under(c_paludis_module, "URIManualOnlyLabel", c_uri_label);

        /*
         * Document-class: Paludis::DependenciesLabel
         *
         * Dependencies label base class.
         */
        c_dependencies_label = rb_define_class_under(c_paludis_module, "DependenciesLabel", rb_cObject);
        rb_funcall(c_dependencies_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
        rb_define_method(c_dependencies_label, "text", dependencies_label_text, 0);
        rb_define_method(c_dependencies_label, "to_s", dependencies_label_text, 0);

        c_dependencies_build_label = rb_define_class_under(c_paludis_module, "DependenciesBuildLabel", c_dependencies_label);
        c_dependencies_test_label = rb_define_class_under(c_paludis_module, "DependenciesTestLabel", c_dependencies_label);
        c_dependencies_run_label = rb_define_class_under(c_paludis_module, "DependenciesRunLabel", c_dependencies_label);
        c_dependencies_post_label = rb_define_class_under(c_paludis_module, "DependenciesPostLabel", c_dependencies_label);
        c_dependencies_install_label = rb_define_class_under(c_paludis_module, "DependenciesInstallLabel", c_dependencies_label);
        c_dependencies_compile_against_label = rb_define_class_under(c_paludis_module, "DependenciesCompileAgainstLabel", c_dependencies_label);
        c_dependencies_fetch_label = rb_define_class_under(c_paludis_module, "DependenciesFetchLabel", c_dependencies_label);
        c_dependencies_suggestion_label = rb_define_class_under(c_paludis_module, "DependenciesSuggestionLabel", c_dependencies_label);
        c_dependencies_recommendation_label = rb_define_class_under(c_paludis_module, "DependenciesRecommendationLabel", c_dependencies_label);

    }
}
to_s → String click to toggle source

Fetch a string representation of ourself.

VALUE
    dependencies_label_text(VALUE self)
    {
        std::shared_ptr<const DependenciesLabel> * ptr;
        Data_Get_Struct(self, std::shared_ptr<const DependenciesLabel>, ptr);
        return rb_str_new2((*ptr)->text().c_str());
    }

    void do_register_dep_label()
    {
        /*
         * Document-class: Paludis::URILabel
         *
         * URI label base class.
         */
        c_uri_label = rb_define_class_under(c_paludis_module, "URILabel", rb_cObject);
        rb_funcall(c_uri_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
        rb_define_method(c_uri_label, "text", uri_label_text, 0);
        rb_define_method(c_uri_label, "to_s", uri_label_text, 0);

        c_uri_mirrors_then_listed_label = rb_define_class_under(c_paludis_module, "URIMirrorsThenListedLabel", c_uri_label);
        c_uri_mirrors_only_label = rb_define_class_under(c_paludis_module, "URIMirrorsOnlyLabel", c_uri_label);
        c_uri_listed_only_label = rb_define_class_under(c_paludis_module, "URIListedOnlyLabel", c_uri_label);
        c_uri_listed_then_mirrors_label = rb_define_class_under(c_paludis_module, "URIListedThenMirrorsLabel", c_uri_label);
        c_uri_local_mirrors_only_label = rb_define_class_under(c_paludis_module, "URILocalMirrorsOnlyLabel", c_uri_label);
        c_uri_manual_only_label = rb_define_class_under(c_paludis_module, "URIManualOnlyLabel", c_uri_label);

        /*
         * Document-class: Paludis::DependenciesLabel
         *
         * Dependencies label base class.
         */
        c_dependencies_label = rb_define_class_under(c_paludis_module, "DependenciesLabel", rb_cObject);
        rb_funcall(c_dependencies_label, rb_intern("private_class_method"), 1, rb_str_new2("new"));
        rb_define_method(c_dependencies_label, "text", dependencies_label_text, 0);
        rb_define_method(c_dependencies_label, "to_s", dependencies_label_text, 0);

        c_dependencies_build_label = rb_define_class_under(c_paludis_module, "DependenciesBuildLabel", c_dependencies_label);
        c_dependencies_test_label = rb_define_class_under(c_paludis_module, "DependenciesTestLabel", c_dependencies_label);
        c_dependencies_run_label = rb_define_class_under(c_paludis_module, "DependenciesRunLabel", c_dependencies_label);
        c_dependencies_post_label = rb_define_class_under(c_paludis_module, "DependenciesPostLabel", c_dependencies_label);
        c_dependencies_install_label = rb_define_class_under(c_paludis_module, "DependenciesInstallLabel", c_dependencies_label);
        c_dependencies_compile_against_label = rb_define_class_under(c_paludis_module, "DependenciesCompileAgainstLabel", c_dependencies_label);
        c_dependencies_fetch_label = rb_define_class_under(c_paludis_module, "DependenciesFetchLabel", c_dependencies_label);
        c_dependencies_suggestion_label = rb_define_class_under(c_paludis_module, "DependenciesSuggestionLabel", c_dependencies_label);
        c_dependencies_recommendation_label = rb_define_class_under(c_paludis_module, "DependenciesRecommendationLabel", c_dependencies_label);

    }
}