Method: HTTP::Options#features=
- Defined in:
- lib/http/options.rb
#features=(features) ⇒ Object
106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/http/options.rb', line 106 def features=(features) @features = features.each_with_object({}) do |(name, opts_or_feature), h| h[name] = if opts_or_feature.is_a?(Feature) opts_or_feature else unless (feature = self.class.available_features[name]) argument_error! "Unsupported feature: #{name}" end feature.new(**opts_or_feature) end end end |