8000 MetadataDrop: update mutations reference to use helper method · ConnectionMaster/github-metadata@6b4073d · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b4073d

Browse files
committed
MetadataDrop: update mutations reference to use helper method
1 parent 46db5d7 commit 6b4073d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/jekyll-github-metadata/metadata_drop.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class MetadataDrop < Jekyll::Drops::Drop
1414
alias_method :invoke_drop, :[]
1515
def key?(key)
1616
return false if key.nil?
17-
return true if self.class.mutable? && @mutations.key?(key)
17+
return true if self.class.mutable? && mutations.key?(key)
1818

1919
respond_to?(key) || fallback_data.key?(key)
2020
end
@@ -95,6 +95,10 @@ def build_revision
9595
def fallback_data
9696
@fallback_data ||= {}
9797
end
98+
99+
def mutations
100+
@mutations ||= {}
101+
end
98102
end
99103
end
100104
end

0 commit comments

Comments
 (0)
0