From ba08e172043d63a2e35fd23d8aa9da7e7920c09d Mon Sep 17 00:00:00 2001 From: Anatoliy Yastreb Date: Thu, 7 Jul 2016 11:30:45 +0300 Subject: [PATCH] Extract tag name to class method --- lib/jekyll/tags/link.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/tags/link.rb b/lib/jekyll/tags/link.rb index e6dcde61..6ffd4726 100644 --- a/lib/jekyll/tags/link.rb +++ b/lib/jekyll/tags/link.rb @@ -1,7 +1,11 @@ module Jekyll module Tags class Link < Liquid::Tag - TAG_NAME = "link".freeze + class << self + def tag_name + self.name.split("::").last.downcase + end + end def initialize(tag_name, relative_path, tokens) super @@ -17,7 +21,7 @@ module Jekyll end raise ArgumentError, <