Class: MetzScan::Analyzers::ServiceSoup::ServiceCallPattern

Inherits:
Object
  • Object
show all
Defined in:
lib/metz_scan/analyzers/service_soup/service_call_pattern.rb

Defined Under Namespace

Classes: Match

Constant Summary collapse

CLASS_SERVICE_METHODS =
%i[call].freeze
NEW_SERVICE_METHOD_STYLES =
{ call: :new_call, perform: :new_perform }.freeze

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ ServiceCallPattern

Returns a new instance of ServiceCallPattern.



11
12
13
# File 'lib/metz_scan/analyzers/service_soup/service_call_pattern.rb', line 11

def initialize(node)
  @node = node
end

Instance Method Details

#matchObject



15
16
17
18
19
20
# File 'lib/metz_scan/analyzers/service_soup/service_call_pattern.rb', line 15

def match
  return class_match if class_service_call?
  return new_match if new_service_call?

  nil
end