Module: CodePicture::Cli::Commands::Result

Defined in:
lib/code_picture/cli/commands/result/failure.rb,
lib/code_picture/cli/commands/result/success.rb

Constant Summary collapse

Failure =
Data.define(:error) do
  def successful? = false

  def failed? = true

  def on_success = self

  def on_failure = yield(error)
end
Success =
Data.define(:value) do
  def successful? = true

  def failed? = false

  def on_success = yield(value)

  def on_failure = self
end