Sha256: 5d04c4eda585377db168918e00eac0833b040896c5ebec9064b7c73b0cea6a17

Contents?: true

Size: 380 Bytes

Versions: 85

Compression:

Stored size: 380 Bytes

Contents

module Inferno
  module Web
    module Serializers
      class Serializer < Blueprinter::Base
        def self.field_present?(field_name, result, options)
          name = options[:name] || field_name
          if result.respond_to?(:[])
            result[name].present?
          else
            result.send(name).present?
          end
        end
      end
    end
  end
end

Version data entries

85 entries across 85 versions & 1 rubygems

Version Path
inferno_core-0.4.43 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.42 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.41 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.40 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.39 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.38 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.35 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.34 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.33 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.32 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.31 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.30 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.29 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.28 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.27 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.26 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.25 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.24 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.23 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.22 lib/inferno/apps/web/serializers/serializer.rb