Class: RailsOpenapiGen::Parsers::Jbuilder::CallDetectors::NullHandlingDetector
- Inherits:
-
Object
- Object
- RailsOpenapiGen::Parsers::Jbuilder::CallDetectors::NullHandlingDetector
- Defined in:
- lib/rails-openapi-gen/parsers/jbuilder/call_detectors/null_handling_detector.rb
Class Method Summary collapse
-
.null_handling?(receiver, method_name) ⇒ Boolean
Detects if node represents a null/nil handling method.
Class Method Details
.null_handling?(receiver, method_name) ⇒ Boolean
Detects if node represents a null/nil handling method
10 11 12 13 14 15 |
# File 'lib/rails-openapi-gen/parsers/jbuilder/call_detectors/null_handling_detector.rb', line 10 def null_handling?(receiver, method_name) return false unless json_receiver?(receiver) null_handling_methods = %i[ignore_nil! nil! null!] null_handling_methods.include?(method_name) end |