Skip to content

How to get an instance inside Grape::API class #1866

Closed
@ec

Description

@ec

Since #1803 Grape:API instance stopped presenting the data inside.
Previously we used parent_name in order to rewrite standard errors classes to change errors format.

With grape 1.1.0
api = @scope.instance_variable_get(:@api)
module_name = api.parent.name.humanize.demodulize

So, since i've update grape to 1.2.0+ it stopped to work
How can i get the data now?

I will appreciate any help, thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions