Top Level Namespace

Defined Under Namespace

Modules: ActiveRecordOptionShim, Errgonomic Classes: Array, FalseClass, Hash, NilClass, Numeric, Object, SomeValidator, 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.



401
402
403
# File 'lib/errgonomic/result.rb', line 401

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

#NoneObject

Global convenience for constructing a None value.



390
391
392
# File 'lib/errgonomic/option.rb', line 390

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

#Ok(value) ⇒ Object

Global convenience method for constructing an Ok result.



396
397
398
# File 'lib/errgonomic/result.rb', line 396

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

#Some(value) ⇒ Object

Global convenience for constructing a Some value.



385
386
387
# File 'lib/errgonomic/option.rb', line 385

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