Class: RuboCop::Cop::Rails::HashSerializer
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Rails::HashSerializer
- Defined in:
- lib/rubocop/cop/hash_serializer_cops.rb
Overview
This cop checks for the use of the serialize Hash macro.
Constant Summary collapse
- MSG =
'Prefer saving parameters to JSON or manual, if possible.'
- RESTRICT_ON_SEND =
%i[serialize].freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
22 23 24 25 26 |
# File 'lib/rubocop/cop/hash_serializer_cops.rb', line 22 def on_send(node) return unless serializable_hash?(node) add_offense(node) end |