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.



512
513
514
# File 'lib/errgonomic/result.rb', line 512

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

#NoneObject

Global convenience for constructing a None value.



564
565
566
# File 'lib/errgonomic/option.rb', line 564

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

#Ok(value) ⇒ Object

Global convenience method for constructing an Ok result.



507
508
509
# File 'lib/errgonomic/result.rb', line 507

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

#Some(value) ⇒ Object

Global convenience for constructing a Some value.



559
560
561
# File 'lib/errgonomic/option.rb', line 559

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