Sha256: 2471430f6613d58a3177565665451a8af6ea4f562c28db173da5287f10436242

Contents?: true

Size: 438 Bytes

Versions: 7

Compression:

Stored size: 438 Bytes

Contents

module SoberSwag
  module Reporting
    module Output
      ##
      # Output JSON nulls.
      class Null < Base
        def call(input)
          input
        end

        def serialize_report(input)
          result = call(input)

          return Report::Value.new(['was not null']) unless result.nil?

          result
        end

        def swagger_schema
          [{ type: 'null' }, {}]
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sober_swag-0.25.2 lib/sober_swag/reporting/output/null.rb
sober_swag-0.25.1 lib/sober_swag/reporting/output/null.rb
sober_swag-0.25.0 lib/sober_swag/reporting/output/null.rb
sober_swag-0.24.1 lib/sober_swag/reporting/output/null.rb
sober_swag-0.24.0 lib/sober_swag/reporting/output/null.rb
sober_swag-0.23.0 lib/sober_swag/reporting/output/null.rb
sober_swag-0.22.0 lib/sober_swag/reporting/output/null.rb