class Therapy::ParseContext(T, V)

Defined in:

therapy/parse_context.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(value : V, type : Therapy::BaseType(T), full_path : Array(Int32 | String) = [] of String | Int32) #

[View source]

Instance Method Detail

def add_error(msg : String, path : Array(String | Int32) | Nil = nil) #

[View source]
def assemble_from_subcontexts : T | Nil #

Called by container types to assemble result from subcontexts


[View source]
def do_parse : Nil #

[View source]
def errors : Array(Therapy::Error) #

[View source]
def full_path : Array(String | Int32) #

[View source]
def has_subcontexts? : Bool #

[View source]
def parse : Result(T) #

[View source]
def result_value : T #

[View source]
def value : V #

[View source]
def value=(value : V) #

[View source]
def with_subcontexts(parse : -> Nil, collect_errors : -> Array(Error), assemble : -> T | Nil) : self #

Set subcontext handlers - called by container types when creating context


[View source]