Top Level Namespace

Defined Under Namespace

Modules: Errgonomic Classes: Array, FalseClass, Hash, NilClass, Numeric, Object, String, Symbol, Time, TrueClass

Instance Method Summary collapse

Instance Method Details

#Err(value = Errgonomic::Result::Err::Arbitrary) ⇒ Object

Global convenience method for constructing an Err result.



314
315
316
# File 'lib/errgonomic/result.rb', line 314

def Err(value = Errgonomic::Result::Err::Arbitrary)
  Errgonomic::Result::Err.new(value)
end

#NoneObject

Global convenience for constructing a None value.



356
357
358
# File 'lib/errgonomic/option.rb', line 356

def None
  Errgonomic::Option::None.new
end

#Ok(value) ⇒ Object

Global convenience method for constructing an Ok result.



309
310
311
# File 'lib/errgonomic/result.rb', line 309

def Ok(value)
  Errgonomic::Result::Ok.new(value)
end

#Some(value) ⇒ Object

Global convenience for constructing a Some value.



351
352
353
# File 'lib/errgonomic/option.rb', line 351

def Some(value)
  Errgonomic::Option::Some.new(value)
end