Output correct class name in custom inspect string
This commit is contained in:
parent
500dd64316
commit
ae0a064f3f
|
@ -153,7 +153,7 @@ module Jekyll
|
|||
#
|
||||
# Returns the inspect string
|
||||
def inspect
|
||||
"#<Jekyll::Collection @label=#{label} docs=#{docs}>"
|
||||
"#<#{self.class} @label=#{label} docs=#{docs}>"
|
||||
end
|
||||
|
||||
# Produce a sanitized label name
|
||||
|
|
|
@ -295,7 +295,7 @@ module Jekyll
|
|||
#
|
||||
# Returns the inspect string for this document.
|
||||
def inspect
|
||||
"#<Jekyll::Document #{relative_path} collection=#{collection.label}>"
|
||||
"#<#{self.class} #{relative_path} collection=#{collection.label}>"
|
||||
end
|
||||
|
||||
# The string representation for this document.
|
||||
|
|
|
@ -77,7 +77,7 @@ module Jekyll
|
|||
|
||||
# Returns the shorthand String identifier of this doc.
|
||||
def inspect
|
||||
"<Excerpt: #{id}>"
|
||||
"<#{self.class} id=#{id}>"
|
||||
end
|
||||
|
||||
def output
|
||||
|
|
|
@ -69,7 +69,7 @@ class TestExcerpt < JekyllUnitTest
|
|||
|
||||
context "#inspect" do
|
||||
should "contain the excerpt id as a shorthand string identifier" do
|
||||
assert_equal @excerpt.inspect, "<Excerpt: #{@excerpt.id}>"
|
||||
assert_equal @excerpt.inspect, "<#{@excerpt.class} id=#{@excerpt.id}>"
|
||||
end
|
||||
|
||||
should "return a string" do
|
||||
|
|
Loading…
Reference in New Issue