ruby-grape/grape-entity

View on GitHub
lib/grape_entity/exposure/delegator_exposure.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module Grape
  class Entity
    module Exposure
      class DelegatorExposure < Base
        def value(entity, _options)
          entity.delegate_attribute(attribute)
        end
      end
    end
  end
end