Skip to content

Commit 1a38ba4

Browse files
committed
Lint: Fix Style/TrivialAccessors
See also #1134
1 parent 4596969 commit 1a38ba4

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

.rubocop_todo.yml

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/money/money.rb

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,6 @@ def self.default_currency
179179
end
180180
end
181181

182-
def self.default_currency=(currency)
183-
@default_currency = currency
184-
end
185-
186182
# Modified to support thread-local bank override
187183
def self.default_bank
188184
# Check for thread-local bank first, then fall back to global default
@@ -218,11 +214,6 @@ def self.locale_backend=(value)
218214
@locale_backend = value ? LocaleBackend.find(value) : nil
219215
end
220216

221-
# @attr_writer rounding_mode Use this to specify the rounding mode
222-
def self.rounding_mode=(new_rounding_mode)
223-
@rounding_mode = new_rounding_mode
224-
end
225-
226217
def self.setup_defaults
227218
# Set the default bank for creating new +Money+ objects.
228219
self.default_bank = Bank::VariableExchange.instance
@@ -336,6 +327,11 @@ def self.from_dollars(amount, currency = default_currency, options = {})
336327
end
337328

338329
class << self
330+
attr_writer :default_currency
331+
332+
# @attr_writer rounding_mode Use this to specify the rounding mode
333+
attr_writer :rounding_mode
334+
339335
alias_method :from_cents, :new
340336
end
341337

0 commit comments

Comments
 (0)