Sha256: 549ed88338e63250ff4cd9f033d73919cd7fd450dcd104e69c1bb2682cb51b9b

Contents?: true

Size: 316 Bytes

Versions: 2

Compression:

Stored size: 316 Bytes

Contents

class Taro::Types::ObjectTypes::NoContentType < Taro::Types::ObjectType
  self.desc = 'An empty response'

  # render takes no arguments in this case
  def self.render
    super(nil)
  end

  def coerce_input
    input_error 'NoContentType cannot be used as input type'
  end

  def coerce_response
    {}
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
taro-1.1.0 lib/taro/types/object_types/no_content_type.rb
taro-1.0.0 lib/taro/types/object_types/no_content_type.rb