aboutsummaryrefslogtreecommitdiff
path: root/bindings/ruby/init.c
diff options
context:
space:
mode:
authorLudovic LANGE <ll-notmuchmail@lange.nom.fr>2016-03-06 07:56:28 -0400
committerDavid Bremner <david@tethera.net>2016-05-19 08:02:43 -0300
commit7e6e23c36e290d4b22b0449766a6ef2107f1ef6c (patch)
tree84bfc83815e67c8469689c0bea30df2cbb37ad98 /bindings/ruby/init.c
parentb183f2635eaf323066f26c7ca22d931d4f4ccd3a (diff)
ruby: add bindings for `notmuch_database_get_all_tags`
The Ruby bindings were missing a way to get all the tags of the database. Now you should be able to access this with the public instance method `all_tags` of your database object. Example of use: notmuchdb = Notmuch::Database.new path, { :create => false, :mode => Notmuch::MODE_READ_ONLY } my_tags = notmuchdb.all_tags my_tags.each { |tag| print tag } my_tags.destroy! Amended by db: improve error reporting, add test
Diffstat (limited to 'bindings/ruby/init.c')
-rw-r--r--bindings/ruby/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c
index ab3f22df..865d6bf6 100644
--- a/bindings/ruby/init.c
+++ b/bindings/ruby/init.c
@@ -229,6 +229,7 @@ Init_notmuch (void)
notmuch_rb_database_find_message, 1); /* in database.c */
rb_define_method (notmuch_rb_cDatabase, "find_message_by_filename",
notmuch_rb_database_find_message_by_filename, 1); /* in database.c */
+ rb_define_method (notmuch_rb_cDatabase, "all_tags", notmuch_rb_database_get_all_tags, 0); /* in database.c */
rb_define_method (notmuch_rb_cDatabase, "query", notmuch_rb_database_query_create, 1); /* in database.c */
/*