Module: Linguadata::Option

Defined in:
lib/linguadata.rb

Defined Under Namespace

Classes: None, Some

Instance Method Summary collapse

Instance Method Details

#from_nillable(value) ⇒ Object



52
53
54
55
56
57
58
59
# File 'lib/linguadata.rb', line 52

def from_nillable(value)
  case value
  in nil
    None[]
  else
    Some[value]
  end
end