lib/rexpense/http.rb
Freeze mutable objects assigned to constants. Open
Open
SANDBOX_URL = "https://sandbox.rexpense.com/api"
- Read upRead up
- Exclude checks
This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).
Example:
# bad
CONST = [1, 2, 3]
# good
CONST = [1, 2, 3].freeze
Freeze mutable objects assigned to constants. Open
Open
PRODUCTION_URL = "https://app.rexpense.com/api"
- Read upRead up
- Exclude checks
This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).
Example:
# bad
CONST = [1, 2, 3]
# good
CONST = [1, 2, 3].freeze