class
Therapy::ParseContext(T, V)
- Therapy::ParseContext(T, V)
- Reference
- Object
Defined in:
therapy/parse_context.crConstructors
Instance Method Summary
- #add_error(msg : String, path : Array(String | Int32) | Nil = nil)
-
#assemble_from_subcontexts : T | Nil
Called by container types to assemble result from subcontexts
- #do_parse : Nil
- #errors : Array(Therapy::Error)
- #full_path : Array(String | Int32)
- #has_subcontexts? : Bool
- #parse : Result(T)
- #result_value : T
- #value : V
- #value=(value : V)
-
#with_subcontexts(parse : -> Nil, collect_errors : -> Array(Error), assemble : -> T | Nil) : self
Set subcontext handlers - called by container types when creating context
Constructor Detail
def self.new(value : V, type : Therapy::BaseType(T), full_path : Array(Int32 | String) = [] of String | Int32)
#
Instance Method Detail
def assemble_from_subcontexts : T | Nil
#
Called by container types to assemble result from subcontexts