Skip to content

Instantly share code, notes, and snippets.

@michaelfeathers
Created February 2, 2013 15:29
Show Gist options
  • Save michaelfeathers/4697837 to your computer and use it in GitHub Desktop.
Save michaelfeathers/4697837 to your computer and use it in GitHub Desktop.
def field_names
@field_names ||= @expression.flatten
.each_cons(2)
.select {|marker, _| marker == :@ivar }
.map {|_,name| field_name(name) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment