Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Filter.define #895

Merged
merged 1 commit into from Jul 10, 2016

Conversation

Projects
None yet
1 participant
@ddfreyne
Copy link
Member

commented Jul 2, 2016

This makes filter easier to define.

Before:

Class.new(Nanoc::Filter) do
  identifier :upcase

  def run(content, params={})
    content.upcase
  end
end

After:

Nanoc::Filter.define(:upcase) do |content, params|
  content.upcase
end

@ddfreyne ddfreyne added this to the 4.3 milestone Jul 2, 2016

@ddfreyne ddfreyne force-pushed the filter-define branch from 6867686 to b177dad Jul 2, 2016

@ddfreyne ddfreyne force-pushed the filter-define branch 3 times, most recently from 6e0a12c to 7f7410c Jul 2, 2016

@ddfreyne ddfreyne force-pushed the filter-define branch 2 times, most recently from 01cd8a7 to 04e35d0 Jul 10, 2016

@ddfreyne ddfreyne merged commit 4fc7c2d into master Jul 10, 2016

1 check passed

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

@ddfreyne ddfreyne deleted the filter-define branch Jul 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.