Rubocop: Style/TrivialAccessors

- Use `attr_writer` to define trivial writer methods
This commit is contained in:
Pat Hawks 2016-01-04 11:39:14 -08:00
parent af9ec6831d
commit f9926edbc4
No known key found for this signature in database
GPG Key ID: F1746FF5F18B3D1B
1 changed files with 2 additions and 9 deletions

View File

@ -4,7 +4,8 @@ module Jekyll
class Document class Document
include Comparable 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 YAML_FRONT_MATTER_REGEXP = /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m
DATELESS_FILENAME_MATCHER = /^(.*)(\.[^.]+)$/ DATELESS_FILENAME_MATCHER = /^(.*)(\.[^.]+)$/
@ -39,14 +40,6 @@ module Jekyll
trigger_hooks(:post_init) trigger_hooks(:post_init)
end end
def output=(output)
@output = output
end
def content=(content)
@content = content
end
# Fetch the Document's data. # Fetch the Document's data.
# #
# Returns a Hash containing the data. An empty hash is returned if # Returns a Hash containing the data. An empty hash is returned if