Rubocop updates (#1118)

* Minimal code style enforcement

* Formatting and lint code updates (no change in functionality)
This commit is contained in:
Zach Gollwitzer
2024-08-23 10:06:24 -04:00
committed by GitHub
parent 359bceb58e
commit eef4c2643b
41 changed files with 529 additions and 519 deletions

View File

@@ -1,14 +1,14 @@
module Monetizable
extend ActiveSupport::Concern
extend ActiveSupport::Concern
class_methods do
def monetize(*fields)
fields.each do |field|
define_method("#{field}_money") do
value = self.send(field)
value.nil? ? nil : Money.new(value, currency || Money.default_currency)
end
class_methods do
def monetize(*fields)
fields.each do |field|
define_method("#{field}_money") do
value = self.send(field)
value.nil? ? nil : Money.new(value, currency || Money.default_currency)
end
end
end
end
end