class Flow::Result(H)

Included Modules

Defined in:

flow/result.cr

Constructors

Instance Method Summary

Instance methods inherited from module Flow::Response::Helpers

error_response(body : NamedTuple | Hash, status : HTTP::Status = HTTP::Status::BAD_REQUEST) : Flow::Response
error_response(body : JSON::Any, status : HTTP::Status = HTTP::Status::BAD_REQUEST) : Flow::Response
error_response
, json_response(body : JSON::Any, status : HTTP::Status = HTTP::Status::OK) : Flow::Response
json_response(body : NamedTuple | Hash, status : HTTP::Status = HTTP::Status::OK) : Flow::Response
json_response
, response_body response_body, response_status response_status, returned? returned?

Constructor Detail

def self.new(is_success : Bool, data : H, result_type : String) #

[View source]

Instance Method Detail

def data : H #

[View source]
def data=(data : H) #

[View source]
def failure? #

[View source]
def is_success : Bool #

[View source]
def is_success=(is_success : Bool) #

[View source]
def merge_data(input : Hash) #

[View source]
def on_exception(&block : Flow::Result(H) -> U) : Flow::Result forall U #

[View source]
def on_failure(result_type_sym : String, &block : Flow::Result(H) -> U) : Flow::Result forall U #

[View source]
def on_failure(result_types : Array(String), &block : Flow::Result(H) -> U) : Flow::Result forall U #

[View source]
def on_failure(&block : Flow::Result(H) -> U) : Flow::Result forall U #

[View source]
def on_failure(*result_types, &block : Flow::Result(H) -> U) : Flow::Result forall U #

[View source]
def on_success(&block : Flow::Result(H) -> U) : Flow::Result forall U #

[View source]
def result_type : String #

[View source]
def result_type=(result_type : String) #

[View source]
def success? #

[View source]
def then(step : Flow::Step.class, params : U) : Flow::Result forall U #

[View source]
def then(step : Flow::Step.class) : Flow::Result forall U #

[View source]