Module: RuboCop::RBS::OnTypeHelper
- Included in:
- Cop::RBS::Style::EmptyArgument::MethodTypeChecker, CopBase
- Defined in:
- lib/rubocop/rbs/on_type_helper.rb
Instance Method Summary collapse
Instance Method Details
#on_not_type(types, type, &block) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rubocop/rbs/on_type_helper.rb', line 16 def on_not_type(types, type, &block) case type when *types # not else yield type end type.each_type do |t| on_not_type(types, t, &block) end end |
#on_type(types, type, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/rubocop/rbs/on_type_helper.rb', line 6 def on_type(types, type, &block) case type when *types yield type end type.each_type do |t| on_type(types, t, &block) end end |