Class: RailsOpenapiGen::Parsers::Jbuilder::Processors::PartialProcessor

Inherits:
BaseProcessor
  • Object
show all
Defined in:
lib/rails-openapi-gen/parsers/jbuilder/processors/partial_processor.rb

Constant Summary collapse

CallDetectors =

Alias for shorter reference to call detectors

RailsOpenapiGen::Parsers::Jbuilder::CallDetectors

Constants inherited from BaseProcessor

BaseProcessor::JbuilderParser

Instance Method Summary collapse

Methods inherited from BaseProcessor

#handler_missing, #initialize, #on_if, #partials, #properties

Constructor Details

This class inherits a constructor from RailsOpenapiGen::Parsers::Jbuilder::Processors::BaseProcessor

Instance Method Details

#on_send(node) ⇒ void

This method returns an undefined value.

Processes method call nodes for partial render calls

Parameters:

  • Method call node



13
14
15
16
17
18
19
20
21
# File 'lib/rails-openapi-gen/parsers/jbuilder/processors/partial_processor.rb', line 13

def on_send(node)
  receiver, method_name, *args = node.children

  process_partial(args) if RailsOpenapiGen::Parsers::Jbuilder::CallDetectors::PartialCallDetector.partial_call?(
    receiver, method_name
  )

  super
end