Class: WisperNext::CastToOptions Private
- Inherits:
-
Object
- Object
- WisperNext::CastToOptions
- Defined in:
- lib/wisper_next/cast_to_options.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .call(arguments) ⇒ Object private
Class Method Details
.call(arguments) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/wisper_next/cast_to_options.rb', line 12 def self.call(arguments) arguments.reduce({}) do |memo, item| case item when Symbol memo[item] = true when Hash memo.merge!(item) else raise(ArgumentError, "Unsupported option: #{item.inspect} (#{item.class.name})") end memo end end |