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.



349
350
351
# File 'lib/errgonomic/result.rb', line 349

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

#NoneObject

Global convenience for constructing a None value.



369
370
371
# File 'lib/errgonomic/option.rb', line 369

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

#Ok(value) ⇒ Object

Global convenience method for constructing an Ok result.



344
345
346
# File 'lib/errgonomic/result.rb', line 344

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

#Some(value) ⇒ Object

Global convenience for constructing a Some value.



364
365
366
# File 'lib/errgonomic/option.rb', line 364

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