lib/brief/document.rb in brief-1.9.12 vs lib/brief/document.rb in brief-1.9.13
- old
+ new
@@ -29,9 +29,13 @@
def document
self
end
+ def title
+ (data && data.title) || css('h1:first-of-type').text || path.to_s.split("/").last.gsub(/\..*/,'')
+ end
+
def to_s
"#{ model_class }.at_path(#{relative_path})"
end
def inspect