RuboCop: enforce empty lines surrounding block?

Viewed 100

I would like to get RuboCop to enforce a style like this:

# bad

alias_method :pharmacy, :recipient
alias_method :pharmacy=, :recipient=
before_save -> do
  self.label = "Prescription" if label.blank?
end
before_save -> do
  self.recipient ||= appointment.patient.pharmacy
end

# good

alias_method :pharmacy, :recipient
alias_method :pharmacy=, :recipient=

before_save -> do
  self.label = "Prescription" if label.blank?
end

before_save -> do
  self.recipient ||= appointment.patient.pharmacy
end

Is this possible?

1 Answers
Related