Ok(T)
Result Ok.
Constructors
created(value) : Ok
Creates a new Ok instance with the status :created.
This method is a shortcut for Ok.new :created, value.
res = Ok.created(value)
res.status # => :created
pp res.unwrap
# or
pp res.value
destroyed(value) : Ok
Creates a new Ok instance with the status :destroyed.
This method is a shortcut for Ok.new :destroyed, value.
res = Ok.destroyed(value)
res.status # => :destroyed
pp res.unwrap
# or
pp res.value
done(value) : Ok
Creates a new Ok instance with the status :done.
This method is a shortcut for Ok.new :done, value.
res = Ok.done(value)
res.status # => :done
pp res.unwrap
# or
pp res.value
new(value : T)
SourceClass methods
Instance methods
status
Result status as a Symbol (:done or :fail, etc).