From 48fb10fef522ab9262061bc612b44d74a8bda17d Mon Sep 17 00:00:00 2001 From: Seba Gamboa Date: Fri, 25 Sep 2015 13:12:22 -0300 Subject: Listing functions --- lib/yard/mruby/templates/helpers.rb | 1 + lib/yard/mruby/templates/helpers/html_helper.rb | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 lib/yard/mruby/templates/helpers.rb create mode 100644 lib/yard/mruby/templates/helpers/html_helper.rb (limited to 'lib/yard/mruby/templates') diff --git a/lib/yard/mruby/templates/helpers.rb b/lib/yard/mruby/templates/helpers.rb new file mode 100644 index 0000000..c1fe8bb --- /dev/null +++ b/lib/yard/mruby/templates/helpers.rb @@ -0,0 +1 @@ +require_relative 'helpers/html_helper' diff --git a/lib/yard/mruby/templates/helpers/html_helper.rb b/lib/yard/mruby/templates/helpers/html_helper.rb new file mode 100644 index 0000000..46b8664 --- /dev/null +++ b/lib/yard/mruby/templates/helpers/html_helper.rb @@ -0,0 +1,20 @@ +module YARD::MRuby::Templates + module Helpers + # Helper methods for text template formats. + module HTMLHelper + + def fsignature(func, link = true, show_extras = true) + name = func.name + title = "%s" % [h(name)] + + if link + url = url_for(func) + link_url(url, title, :title => title) + else + title + end + end + + end + end +end -- cgit v1.2.3