Class: Temporal::TravelToWithBlock

Inherits:
RuboCop::Cop::Cop
  • Object
show all
Defined in:
lib/rubocop/cop/temporal_cops.rb

Constant Summary collapse

MSG =
"Always use a block when time travelling"

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/rubocop/cop/temporal_cops.rb', line 14

def on_send(node)
  travel_to(node) do
    next if node.block_node

    add_offense(node)
  end
end