Skip to content

Commit afd519c

Browse files
committed
Add #inspect method to views
1 parent 2b89154 commit afd519c

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

lib/nanoc/base/views/config_view.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@ def [](key)
4141
def each(&block)
4242
@config.each(&block)
4343
end
44+
45+
def inspect
46+
"<#{self.class}>"
47+
end
4448
end
4549
end

lib/nanoc/base/views/mixins/document_view_mixin.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,9 @@ def reference
7676
def raw_content
7777
unwrap.content.string
7878
end
79+
80+
def inspect
81+
"<#{self.class} identifier=#{unwrap.identifier}>"
82+
end
7983
end
8084
end

0 commit comments

Comments
 (0)