From f9926edbc44a2b5ef74b693e2da186577ed5eb02 Mon Sep 17 00:00:00 2001 From: Pat Hawks Date: Mon, 4 Jan 2016 11:39:14 -0800 Subject: [PATCH] Rubocop: Style/TrivialAccessors - Use `attr_writer` to define trivial writer methods --- lib/jekyll/document.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/jekyll/document.rb b/lib/jekyll/document.rb index 5b8c9044..0d23ac88 100644 --- a/lib/jekyll/document.rb +++ b/lib/jekyll/document.rb @@ -4,7 +4,8 @@ module Jekyll class Document include Comparable - attr_reader :path, :site, :extname, :output_ext, :content, :output, :collection + attr_reader :path, :site, :extname, :output_ext, :collection + attr_accessor :content, :output YAML_FRONT_MATTER_REGEXP = /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m DATELESS_FILENAME_MATCHER = /^(.*)(\.[^.]+)$/ @@ -39,14 +40,6 @@ module Jekyll trigger_hooks(:post_init) end - def output=(output) - @output = output - end - - def content=(content) - @content = content - end - # Fetch the Document's data. # # Returns a Hash containing the data. An empty hash is returned if