Add fetch method to Drops #5056

Merged
merged 2 commits into from Jul 7, 2016

Conversation

Projects
None yet
4 participants
@ayastreb
Contributor

ayastreb commented Jul 5, 2016

Fixes #4615

As pointed out by @parkr - added fetch method to Drops::Drop class.

lib/jekyll/drops/drop.rb
@@ -199,6 +199,10 @@ def merge!(other)
end
end
end
+
+ def fetch(*args, &block)
+ to_h.fetch(*args, &block)

This comment has been minimized.

@parkr

parkr Jul 6, 2016

Member

#to_h is an expensive operation. Could we mimic the behaviour without having to actually create a hash?

@parkr

parkr Jul 6, 2016

Member

#to_h is an expensive operation. Could we mimic the behaviour without having to actually create a hash?

@parkr parkr added the enhancement label Jul 6, 2016

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jul 7, 2016

Member

This LGTM. @jekyll/core?

Member

parkr commented Jul 7, 2016

This LGTM. @jekyll/core?

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jul 7, 2016

Contributor

:shipit:

Contributor

envygeeks commented Jul 7, 2016

:shipit:

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jul 7, 2016

Member

Thanks @envygeeks :)

@jekyllbot: merge +minor

Member

parkr commented Jul 7, 2016

Thanks @envygeeks :)

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit 08b279c into jekyll:master Jul 7, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

jekyllbot added a commit that referenced this pull request Jul 7, 2016

stevecheckoway added a commit to stevecheckoway/jekyll that referenced this pull request Jul 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment