Class: Capsium::Package::ResponseRewrite

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/capsium/package/routes_config.rb,
sig/capsium/package/routes_config.rbs

Overview

The "responseRewrite" object of an inherited route (05x-routing section "Route Inheritance"): replaces the served body and/or overrides response headers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResponseRewrite

Returns a new instance of ResponseRewrite.

Parameters:

  • body: (String? body)
  • headers: (Hash[String, String]? headers)


10
# File 'sig/capsium/package/routes_config.rbs', line 10

def initialize: (?body: String? body, ?headers: Hash[String, String]? headers) -> void

Instance Attribute Details

#bodyString?

Returns the value of attribute body.

Returns:

  • (String, nil)


7
8
9
# File 'sig/capsium/package/routes_config.rbs', line 7

def body
  @body
end

#headersHash[String, String]?

Returns the value of attribute headers.

Returns:

  • (Hash[String, String], nil)


8
9
10
# File 'sig/capsium/package/routes_config.rbs', line 8

def headers
  @headers
end

Instance Method Details

#to_hashHash[String, untyped]

Returns:

  • (Hash[String, untyped])


13
# File 'sig/capsium/package/routes_config.rbs', line 13

def to_hash: () -> Hash[String, untyped]

#to_jsonString

Parameters:

  • args (Object)

Returns:

  • (String)


12
# File 'sig/capsium/package/routes_config.rbs', line 12

def to_json: (*untyped args) -> String