Rubocop: Style/TrivialAccessors
- Use `attr_writer` to define trivial writer methods
This commit is contained in:
parent
af9ec6831d
commit
f9926edbc4
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue