From f6151e75caabd46444903fa0d5708093f04fb647 Mon Sep 17 00:00:00 2001 From: ser1zw Date: Mon, 30 Apr 2012 19:31:59 +0900 Subject: [PATCH] add YARD settings --- .gitignore | 1 + Rakefile | 7 +++++++ yard_extension.rb | 5 +++++ 3 files changed, 13 insertions(+) create mode 100644 yard_extension.rb diff --git a/.gitignore b/.gitignore index 8ab55b8..3204fb1 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ doc/ log.txt videowriter_result.avi examples/contours/rotated-boxes-with-detected-bounding-rectangles.jpg +.yardoc diff --git a/Rakefile b/Rakefile index 9b3b753..fd79e25 100644 --- a/Rakefile +++ b/Rakefile @@ -4,6 +4,9 @@ require './ext/opencv/lib/opencv/psyched_yaml' require 'hoe' require 'rake/extensiontask' require './ext/opencv/lib/opencv/version' +require 'yard' +require 'yard/rake/yardoc_task' +require File.dirname(__FILE__) + '/yard_extension' Hoe.plugin :gemspec @@ -47,4 +50,8 @@ hoespec.spec.signing_key = nil Rake::Task[:test].prerequisites << :compile +YARD::Rake::YardocTask.new do |t| + t.files = ['ext/opencv/*.cpp', 'ext/opencv/lib/*.rb'] +end + # vim: syntax=Ruby diff --git a/yard_extension.rb b/yard_extension.rb new file mode 100644 index 0000000..a105ac9 --- /dev/null +++ b/yard_extension.rb @@ -0,0 +1,5 @@ +require 'yard' + +YARD::Tags::Library.define_tag('Corresponding OpenCV function', :opencv_func) +YARD::Tags::Library.visible_tags.place(:opencv_func).before(:abstract) +