Method: Lotus::Utils::Kernel.Set
- Defined in:
- lib/lotus/utils/kernel.rb
.Set(arg) ⇒ Set
Coerces the argument to be a Set.
136 137 138 139 140 141 142 143 144 |
# File 'lib/lotus/utils/kernel.rb', line 136 def self.Set(arg) if arg.respond_to?(:to_set) arg.to_set else Set.new(::Kernel.Array(arg)) end rescue NoMethodError raise TypeError.new("can't convert #{inspect_type_error(arg)}into Set") end |