summaryrefslogtreecommitdiffstats
path: root/ruby/ffi-k8055/tasks/notes.rake
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-06-06 10:53:35 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-06-06 10:53:35 +0200
commit49e880da1dbab3850c4eb1682bafad6b57267817 (patch)
treef2bba3048b297189ef51fe304edbb4ec34736801 /ruby/ffi-k8055/tasks/notes.rake
parent5e0aad9befe6214134a77cb267b8c89596945109 (diff)
downloadk8055-49e880da1dbab3850c4eb1682bafad6b57267817.zip
k8055-49e880da1dbab3850c4eb1682bafad6b57267817.tar.gz
add ruby/ffi-k8055
Diffstat (limited to 'ruby/ffi-k8055/tasks/notes.rake')
-rw-r--r--ruby/ffi-k8055/tasks/notes.rake27
1 files changed, 27 insertions, 0 deletions
diff --git a/ruby/ffi-k8055/tasks/notes.rake b/ruby/ffi-k8055/tasks/notes.rake
new file mode 100644
index 0000000..7f7ee79
--- /dev/null
+++ b/ruby/ffi-k8055/tasks/notes.rake
@@ -0,0 +1,27 @@
+# -*- coding: UTF-8 -*-
+#
+if HAVE_BONES
+
+desc "Enumerate all annotations"
+task :notes do |t|
+ id = if t.application.top_level_tasks.length > 1
+ t.application.top_level_tasks.slice!(1..-1).join(' ')
+ end
+ Bones::AnnotationExtractor.enumerate(PROJ, PROJ.notes.tags.join('|'), id, :tag => true)
+end
+
+namespace :notes do
+ PROJ.notes.tags.each do |tag|
+ desc "Enumerate all #{tag} annotations"
+ task tag.downcase.to_sym do |t|
+ id = if t.application.top_level_tasks.length > 1
+ t.application.top_level_tasks.slice!(1..-1).join(' ')
+ end
+ Bones::AnnotationExtractor.enumerate(PROJ, tag, id)
+ end
+ end
+end
+
+end # if HAVE_BONES
+
+# EOF