Sha256: 45e44d2a44ed6c768425790bd046f8d1ad1cb97dcd3824140dfb73610be35e66
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
# typed: strict # frozen_string_literal: true module Vigiles module Types extend T::Sig class ContentType < T::Enum enums do ApplicationJson = new("application/json") TextHtml = new("text/html") Unknown = new end end class HttpMethod < T::Enum enums do OPTIONS = new("OPTIONS") DELETE = new("DELETE") POST = new("POST") HEAD = new("HEAD") GET = new("GET") PUT = new("PUT") end end class WellKnownHttpHeader < T::Enum enums do ContentType = new("content-type") end end HtmlPayload = String UntypedHash = T.type_alias { T::Hash[T.untyped, T.untyped] } JsonPayload = T.type_alias { UntypedHash } Payload = T.type_alias { T.any(JsonPayload, HtmlPayload) } Headers = T.type_alias { T::Hash[String, T.untyped] } ContentTypeRecorder = T.type_alias do T::Hash[String, T.proc.params(arg0: ActionDispatch::Response).returns(Vigiles::Archive::Conversation)] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vigiles-0.1.5 | lib/vigiles/types.rb |