DocumentDrop: use def_delegators instead of duplicating methods
This commit is contained in:
parent
ebe3c10604
commit
03488b1cde
|
@ -3,18 +3,10 @@
|
|||
module Jekyll
|
||||
module Drops
|
||||
class DocumentDrop < ImmutableDrop
|
||||
extend Forwardable
|
||||
|
||||
def output
|
||||
@obj.output
|
||||
end
|
||||
def_delegators :@obj, :id, :output, :content, :to_s, :relative_path, :url
|
||||
|
||||
def content
|
||||
@obj.content
|
||||
end
|
||||
|
||||
def relative_path
|
||||
@obj.relative_path
|
||||
end
|
||||
alias_method :path, :relative_path
|
||||
|
||||
def url
|
||||
|
@ -33,10 +25,6 @@ module Jekyll
|
|||
@obj.previous_doc
|
||||
end
|
||||
|
||||
def id
|
||||
@obj.id
|
||||
end
|
||||
|
||||
def excerpt
|
||||
fallback_data['excerpt'].to_s
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue