Skip to content

Instantly share code, notes, and snippets.

@mwhagedorn
Created April 10, 2014 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwhagedorn/10423228 to your computer and use it in GitHub Desktop.
Save mwhagedorn/10423228 to your computer and use it in GitHub Desktop.
example of rolliing up parent ivars with self
def self.requests
if @required
superclass.requests + (@requests || [])
else
@requests || []
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment