Sha256: 69639263b555b5f252ffbecca0ee4c3842caa8cf28ebb988eacba7c281f0a284

Contents?: true

Size: 422 Bytes

Versions: 4

Compression:

Stored size: 422 Bytes

Contents

module Napa
  class Entity < Grape::Entity
    def self.inherited(subclass)
      ActiveSupport::Deprecation.warn 'Use of Napa::Entity is discouraged, please transition your code to Roar representers - https://github.com/bellycard/napa/blob/master/docs/grape_entity_to_roar.md', caller
    end

    format_with :to_s do |val|
      val.to_s
    end

    def object_type
      object.class.name.underscore
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
napa-0.5.0 lib/napa/output_formatters/entity.rb
napa-0.4.3 lib/napa/output_formatters/entity.rb
napa-0.4.1 lib/napa/output_formatters/entity.rb
napa-0.4.0 lib/napa/output_formatters/entity.rb