lib/infoboxer/templates/base.rb in infoboxer-0.2.7 vs lib/infoboxer/templates/base.rb in infoboxer-0.2.8
- old
+ new
@@ -1,10 +1,10 @@
module Infoboxer
module Templates
class Base < Tree::Template
include Tree
-
+
class << self
attr_accessor :template_name, :template_options
def inspect
template_name ? "Infoboxer::Templates::#{clean_name}" : super
@@ -14,11 +14,11 @@
template_name ? "Template[#{template_name}]" : 'Template'
end
end
def ==(other)
- other.kind_of?(Tree::Template) && _eq(other)
+ other.is_a?(Tree::Template) && _eq(other)
end
protected
def clean_class
@@ -47,10 +47,10 @@
# Replaces template with replacement, while rendering.
#
# Used for {Set} definitions.
class Replace < Base
def replace
- fail(NotImplementedError, "Descendants should define :replace")
+ fail(NotImplementedError, 'Descendants should define :replace')
end
def text
replace
end