class

Alumna::RuleContext

Inherits Reference < Object

Constructors

new(app : App, service : Service, path : String, method : ServiceMethod, phase : RulePhase, params : Http::ParamsView, headers : Http::HeadersView, http_method : String = "GET", remote_ip : String = "", provider : String = "rest", id : String | Nil = nil, data : Hash(String, AnyData) = {} of String => AnyData, store : Hash(String, StoreType) | Nil = nil)
Source

Instance methods

call(path : String, method : ServiceMethod | Symbol, data : Hash(String, AnyData) = {} of String => AnyData, params : Hash(String, String) | Nil = nil, id : String | Nil = nil, store : Hash(String, StoreType) | Nil = nil) : Tuple(ServiceResult, ServiceError | Nil)

Dispatches a request to another internal service, bypassing the HTTP network stack. Dynamically resolves paths (e.g., "/users/123") and isolates query params by default.

Source
data
Source
data=(data : Hash(String, AnyData))
Source
data_bool?(key) : Bool | Nil
Source
data_bytes?(key) : Slice(UInt8) | Nil
Source
data_float?(key) : Float64 | Nil
Source
data_int?(key) : Int64 | Nil
Source
data_str?(key) : String | Nil
Source
data_time?(key) : Time | Nil
Source
error
Source
error=(error : ServiceError | Nil)
Source
headers
Source
headers=(headers : Http::HeadersView)
Source
http
Source
http=(http : HttpOverrides)
Source
http_method
Source
method
Source
params
Source
params=(params : Http::ParamsView)
Source
path
Source
phase
Source
provider
Source
query
Source
remote_ip
Source
result
Source
result=(value : ServiceResult)
Source
result_set?
Source
service
Source
store
Source