module Scanny
  module Checks
    module Helpers
      # system("command")
      # `command`
      def build_pattern_exec_command(command)
        command = command.to_s if command.is_a?(Symbol)
        result  = command.inspect

        <<-EOT
            SendWithArguments
            <
              name = :system | :exec,
              arguments = ActualArguments<
                array = [
                  any*,
                  StringLiteral<string *= #{result}>,
                  any*
                ]
              >
            >
            |
            ExecuteString<string *= #{result}>
        EOT
      end
    end
  end
end
module Scanny
  module Checks
    module Helpers
      # system("command")
      # `command`
      def build_pattern_exec_command(command)
        command = command.to_s if command.is_a?(Symbol)
        result  = command.inspect

        <<-EOT
            SendWithArguments
            <
              name = :system | :exec | :spawn,
              arguments = ActualArguments<
                array = [
                  any*,
                  StringLiteral<string *= #{result}>,
                  any*
                ]
              >
            >
            |
            ExecuteString<string *= #{result}>
        EOT
      end
    end
  end
end
Add spawn method to pattern
Add spawn method to pattern

Method build_pattern_exec_command should build pattern that can
recognize execute system command with spawn method.
