Method: RuboCop::Cop::Primer::DeprecatedArguments#extract_kv_from
- Defined in:
- lib/rubocop/cop/primer/deprecated_arguments.rb
permalink #extract_kv_from(pair) ⇒ Object
[View source]
298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
# File 'lib/rubocop/cop/primer/deprecated_arguments.rb', line 298 def extract_kv_from(pair) key = pair.key.value value = case pair.value.type when :sym, :str pair.value.value.to_sym when :false, :true pair.value.type == :true else return [] end [key, value] end |