apiaryio/redsnow — pull request #45 by nogates (2014-11-28 00:14:02+00:00)
Title: Add resource_group getter to resource

Hello,

I'd like to suggest to include in RedSnow the ability to access the parent node on each blueprint node. For example, I think it'd be nice to be able to access the resource group of a resource using `resource.resource_group`. Same logic would apply to resource-actions, actions-transactional_examples, transactional_examples-requests/responses.

As a developer working with RedSnow I find a bit complicate that, in order to get all the information needed to perform a http request, I have to gather all the different objects and parameters to create this http request (action provides the method, resource provides the uri_template). I think it would be easier if I could just pass the response object, and use it to retrieve its related parents (`response.example, response.example.action, response.example.action.resource, response.example.action.resource.resource_group`)

In this pull request, I've just added the functionality to access the resource_group from resource, but I can do the same for actions, transactional_examples, requests, responses if you like the idea and think it is useful.

Thanks.