module RFunc::Option

Public Class Methods

new(something_or_nothing) click to toggle source
# File lib/rfunc/option.rb, line 325
def self.new(something_or_nothing)
  case something_or_nothing.nil?
    when false
      Some.new(something_or_nothing)
    else
      None.new
  end
end