Sha256: 3ef35edd25920947efbc2254f412d680cb6dcfdbbbca99d74d6ea475d6d3ce0b

Contents?: true

Size: 170 Bytes

Versions: 5

Compression:

Stored size: 170 Bytes

Contents

module Napa
  class Entity < Grape::Entity
    format_with :to_s do |val|
      val.to_s
    end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
napa-0.3.0 lib/napa/output_formatters/entity.rb
napa-0.2.1 lib/napa/grape_extensions/entity.rb
napa-0.2.0 lib/napa/grape_extensions/entity.rb
napa-0.1.29 lib/napa/grape_extensions/entity.rb
napa-0.1.28 lib/napa/grape_extensions/entity.rb