Class: Lite::Validation::Validator::Option::Some::Complex::Wrappers::Object

Inherits:
Abstract::NonIterable
  • Object
show all
Includes:
Singular
Defined in:
lib/lite/validation/validator/option/some/complex/wrappers/object.rb

Instance Method Summary collapse

Methods included from Singular

#some_or_nil, #to_option, #unwrap

Methods included from Dig

#dig

Instance Method Details

#fetch(key) ⇒ Object



16
17
18
19
20
# File 'lib/lite/validation/validator/option/some/complex/wrappers/object.rb', line 16

def fetch(key)
  Option.some(value.send(key))
rescue StandardError => e
  raise InvalidAccess, e.message
end

#inspectObject



22
23
24
# File 'lib/lite/validation/validator/option/some/complex/wrappers/object.rb', line 22

def inspect
  "#<Option::Some::Object class=#{value.class.name}>"
end