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.2 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.2.pre lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.1 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.1.pre2 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.1.pre lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.4.0 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.12 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.11 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.10 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.9 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.8 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.7 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.6 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.5 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.4 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.3 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.2 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.1 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.0 lib/inferno/apps/web/serializers/serializer.rb
inferno_core-0.3.0.rc1 lib/inferno/apps/web/serializers/serializer.rb