Skip to content

Instantly share code, notes, and snippets.

@djbender
Created April 15, 2014 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save djbender/10742594 to your computer and use it in GitHub Desktop.
Save djbender/10742594 to your computer and use it in GitHub Desktop.
show methods ending in "=" except for built in comparison operators.
def public_setters
public_methods.select{|method| method =~ /=$/ }.delete_if{|method| %i(== === !=).include?(method)}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment