Skip to content

Instantly share code, notes, and snippets.

@cupakromer
Last active January 2, 2016 14:39
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 cupakromer/8318170 to your computer and use it in GitHub Desktop.
Save cupakromer/8318170 to your computer and use it in GitHub Desktop.
Find outter most example group description
def top_level_description(e)
top_level(e)[:description]
end
def top_level_object(e)
top_level(e)[:description_args].first
end
# Finds the top level example group.
# By chance, this is actually the innner most nested
# example group.
def top_level_group(e)
group = e.metadata[:example_group]
group = group[:example_group] while group[:example_group]
group
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment