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?