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.2.0 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.2.0.rc4 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.2.0.rc3 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.2.0.rc2 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.2.0.rc1 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.1.4.pre lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.1.3 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.1.3.pre2 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.1.3.pre lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.1.2 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.1.2.pre lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.1.1 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.1.1.pre lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.1.0 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.1.0.pre lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.0.8 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.0.8.pre2 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.0.8.pre lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.0.7 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.0.6 lib/inferno/apps/web/serializers/serializer.rb