ruby-grape / grape-entity

An API focused facade that sits on top of an object model.
MIT License
721 stars 153 forks source link

Allow exposures to call methods defined in included modules #307

Closed robertoz-01 closed 5 years ago

robertoz-01 commented 6 years ago

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 commented 6 years ago
1 Error
:no_entry_sign: 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 :no_entry_sign: danger

coveralls commented 6 years ago

Coverage Status

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

LeFnord commented 5 years ago

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