Skip to content

Allow exposures to call methods defined in included modules #307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

robertoz-01
Copy link
Contributor

@robertoz-01 robertoz-01 commented Sep 4, 2018

It makes possible for the exposure to use methods defined in modules included in the entity. eg:

module MyModule
  def a_value
    ...
  end
end

class A < Grape::Entity
  include MyModule
  expose :a_value
end

@grape-bot
Copy link

grape-bot commented Sep 4, 2018

1 Error
🚫 One of the lines below found in CHANGELOG.md doesn’t match the expected format. Please make it look like the other lines, pay attention to periods and spaces.
* [#258](https://github.com/ruby-grape/grape-entity/pull/307): Allow exposures to call methods defined in modules included in an entity [@robertoz-01](https://github.com/robertoz-01).

Generated by 🚫 danger

@coveralls
Copy link

coveralls commented Sep 4, 2018

Coverage Status

Coverage increased (+0.02%) to 96.11% when pulling 3e00c1b on robertoz-01:handle-module-included-in-entity into 55383e5 on ruby-grape:master.

@LeFnord
Copy link
Member

LeFnord commented Jan 29, 2019

thanks @robertoz-01 … and sorry for the late reply … think this is a welcome feature :)

@LeFnord LeFnord merged commit 52a2851 into ruby-grape:master Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants