Module: UnionType
Instance Method Summary collapse
Methods included from Helper
Instance Method Details
#when(what) ⇒ Either
13 14 15 16 17 18 19 20 |
# File 'lib/union_type.rb', line 13 def when what current_class = self.class.to_s.to_sym if what.include? current_class what[current_class].(@v) elsif what.include? :_ what[:_].(@v) end end |