From 40b222694ed828b7889aa6f6631f585fde5cdfc7 Mon Sep 17 00:00:00 2001 From: Matt Wildig Date: Tue, 25 Mar 2014 21:19:29 +0000 Subject: [PATCH] Delete callbacks.rb define_callback is from Sass and is not used in Haml. --- yard/callbacks.rb | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 yard/callbacks.rb diff --git a/yard/callbacks.rb b/yard/callbacks.rb deleted file mode 100644 index 408dcc49..00000000 --- a/yard/callbacks.rb +++ /dev/null @@ -1,29 +0,0 @@ -class CallbacksHandler < YARD::Handlers::Ruby::Legacy::Base - handles(/\Adefine_callback(\s|\()/) - - def process - callback_name = tokval(statement.tokens[2]) - attr_index = statement.comments.each_with_index {|c, i| break i if c[0] == ?@} - if attr_index.is_a?(Fixnum) - docstring = statement.comments[0...attr_index] - attrs = statement.comments[attr_index..-1] - else - docstring = statement.comments - attrs = [] - end - - yieldparams = "" - attrs.reject! do |a| - next unless a =~ /^@yield *(\[.*?\])/ - yieldparams = $1 - true - end - - o = register(MethodObject.new(namespace, "on_#{callback_name}", scope)) - o.docstring = docstring + [ - "@return [void]", - "@yield #{yieldparams} When the callback is run" - ] + attrs - o.signature = true - end -end